-
Is it possible to get and set the contents of an instance programmatically, from a client-side script running in the browser? For getting, I have figured out that I can get (the current state of) an instance by calling
Is it OK to do this? Or is this an undocumented feature which may not be supported in the future? For setting, I haven't found a way to do that. There is a This doesn't seem to be doable with submissions because a submission sends the instance contents to the server (I want it to stay in the browser). Or am I wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
first of all - yes, it's ok to use getInstanceData() to get the data. Within Fore you can also use the Not sure, which version you're using but there is also a setInstanceData() function in fx-instance. As always there's not just one way to do it - for instance there's also a submission which just echoes some data you submit via submission which will NOT actually send the data over the wire. This can be used to send data from one instance to another. One use case would be to apply filtering out nonrelevant data (which submission will do by default if you have defined some Another option would be the
As the
It all depends on your environment and how you are creating your data. if you could share a bit more on your use case it will be easier to help. |
Beta Was this translation helpful? Give feedback.
first of all - yes, it's ok to use getInstanceData() to get the data. Within Fore you can also use the
instance()
function to get the data from a certain instance - the function may take an idref if you don't want the default instance.Not sure, which version you're using but there is also a setInstanceData() function in fx-instance.
As always there's not just one way to do it - for instance there's also a submission which just echoes some data you submit via submission which will NOT actually send the data over the wire. This can be used to send data from one instance to another. One use case would be to apply filtering out nonrelevant data (which submission will do by default if you hav…