Hi, I am new to Livecycle so don't know all the terms so please bear with me, only started using this yesterday.
I have created a form with subforms and I have written some javasript to duplicate instances based on a text field entered (if count is < 'textfield')
I have also mapped some XML into the original table in subfield 1
my issue is how do I get multiple sets of data into the new instances? each table in the new instance should hold the next set of data.
I am sorry if this has been asked before, I had a look but couldn't see.
Each table could hold different amounts of rows and there could be as many as 100 tables to populate.
Battery | Volts | IntR |
---|---|---|
1 | 11.87 | 1264 |
2 | 12.74 | 1164 |
3 | 11.98 | 1246 |
4 | 11.97 | 1228 |
5 | 12.11 | 1267 |
6 | 11.99 | 1255 |
And
Battery | Volts | IntR |
---|---|---|
1 | 12 | 1244 |
2 | 11.87 | 1274 |
3 | 11.96 | 1250 |
4 | 12.01 | 1276 |
Views
Replies
Total Likes
Hi,
I'm not sure I follow, what do you mean by "the new instance should hold the next set of data", is this data coming from the XML or is it coming from some script based on the data in the original table?
Regards
Bruce
Views
Replies
Total Likes
ok reading your response does make my original question sound stupid, as I said i'm new to this.
while I have been thinking about it I have created multiple pages containing the tables flowed and hide them. idea is I will then make them visible when row count > 0 or maybe 1 as there is a formula in the row so always returns 1 and the data set can't be valid if 1.
How do I make the page visible using javascript. I am here right now
Views
Replies
Total Likes
Hi,
You are right in setting the presence property to visible will make a hidden object visible. But I'm not sure about your code, seems to be when you leave an instance of Row1 you though all the sibling Row1 objects and make their parent visible. You could just to Result4.presence = "visible", as you can always access the parent objects without a resolveNodes (unless you have another object with the same name it finds first). But also not sure how the exit event is being fired on a hidden object, do you have an execEvent('exit') call somewhere?
Bruce
Views
Replies
Total Likes
so I am taking your advice on board and using a button, but I seem to be just swapping 1 problem for another.
what am I doing wrong?
Views
Replies
Total Likes
Hi,
I think the version of JavaScript in the latest versions of Reader/Acrobat are ES5, I think the let keyword came out in ES6, so you should use "for (var i = 0; i < 100; i++)".
Also, in Acrobat under Edit ... Preferences ... JavaScript. Make sure you have "Enable JavaScript debugger" set, when exception is thrown to break, enable interactive console, and show console or errors and messages"
In your case you should see a message "SyntaxError: missing ; after for-loop initializer"
Use Ctrl-J to bring up the JavaScript debugger.
Here are some links which might help;
Using the Acrobat JavaScript Debugger with XFA
Regards
Bruce
Views
Replies
Total Likes