Expand my Community achievements bar.

XML values from text

Avatar

Former Community Member
Hi all



In real need for help so please, if anyone has any ideas...

I've built up an xdp form on a very dynamic basis, the data is deciding a lot and there will also be user interaction through list box choices etc. The main problem is that I don't get all the data to the client, only the data related to the list for the first selection. If I then want the rest of the data, it is situated on the Form Server-side and not the client-side.

If I use the saveXML-function, I get the complete xml file avaliable on the client in a variable but then I will have to switch the datasource to that variable. And how I do that, well that's far beyond my knowledge.

Another approach would be to loop through all of the data and create a multidimensional array with all the data values. But honestly I don't like 5-6 dimensional arrays and it feels kinda wrong since all the data is in a nice xml-format. When previewing it all in the designer it looks great with sample xml data file but that's not worth anything in the real life...



So, if anyone has any tips on how to point a datasource towards a variable or tips about how to easy retrieve values from the global variable containing all xml data I would be really happy. It's kinda urgent since it sholud all be finished by 12 feb and there is a few more things to do then just loading the data.
1 Reply

Avatar

Former Community Member
I'm also thinking about using a hidden subform to store all the data but for some reason I doesn't seem to get access to the values...

I thought something like this would do the trick but obviously not:

var msg;

msg.value = xfa.form.family.sid1.HiddenFormData.child[nItemCount].personid.rawValue;

And believe me, I've tried a lot of different options with value/rawValue etc. nItemCount is a number, looping through a list. msg will be used later on for adding values to different fields. Any opinions?