Is There Any Way to Edit the Application Configuration JSON from VAF?

We need to create properties via VAF and map them into the configuration (without manual mapping). What we face difficulties with is that, cannot find a way to edit the JSON configuration that we see in Advanced tab.

I'm curious if there's a method to accomplish this.

Parents
  • If you're creating the properties via the VAF then why not have your MFIdentifiers assigned the alias of the item you're creating?  That way, once the items are created, simply re-resolve the MFIdentifiers and they'll work without any JSON being altered.

  • So, this alias won't be seen in the configuration JSON?

  • Thanks for the answer. Could modify the application configuration through VAF.

    Just a similar question here, can we modify metadata card configuration the same way with VAF?

  • I believe you can do at least some of this.  If you're a partner then take a look at the GPC Developer content from Mexico last year, where we showed using a part of MFiles.VAF.Configuration to interact with configuration.

    My personal suggestion would be incredibly careful about this though.  Random VAF applications randomly changing MDCC sounds like a recipe for disaster.

  • Hi there, I've taken look at the content you mentioned. Just stuck in the point that once updated the configuration JSON, it doesn't get saved automatically (I see the configuration is not saved unless save button is not clicked for the configuration).

    Is there any way I am missing?

  • Do you mean that the configuration is not taken into use until this time?  All the helpers do is make it easy to access Named Value Storage; they do not cause the running applications to reload their configuration.

  • After updating the configuration programmatically when navigated tot the metadata card configuration, it pops up with the command to save or discard. So I guess I couldn't saved it programmatically although the config is updated but no saved.

  •  Could you please help in this regard?

  • Unfortunately I have very limited time right now. I will try to look at this at some point over the next couple of weeks.

    Some sort of runnable code would make it easier, as you seem to have switched from talking about vault application configuration to MDCC. 

  • Sure. I appreciate your willingness to review it when you have time.

    This is the code snippet we have now for modifying MDCC - 

    FYI - Though it seems it's not saved, I can see the effect of the rules in M-Files Desktop client.

    Thanks.

  • Where is this being run?

  • If you see the effects in the desktop client then it is being saved. I guess what's happening here is that you have M-Files Admin open when this code runs.  What happens if you completely close M-Files Admin, run the code, then open it again?  Does it give you the save/discard options?

Reply
  • If you see the effects in the desktop client then it is being saved. I guess what's happening here is that you have M-Files Admin open when this code runs.  What happens if you completely close M-Files Admin, run the code, then open it again?  Does it give you the save/discard options?

Children
No Data