Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

I cannot get my script to make my table data to create another row of data

Avatar

Level 3

I have my form I need to share with one of you experts... it's a very simple one... to tell me why the form isn't work the way I want it to.  Please tell me how to share the form and I will do so.

The Add detail button does not add additional rows.  The code seems correct but does not work.  Sorry for the seemingly endless rambling, but I'm in a hurry for work .  Please help where you can,  I am very willing to provide my form to whomever is willing to help me out.

Thank you in advance

Mike

My button has the following code attached to it...

xfa.form.form1.mainSF.salesSF.Table1._Details.addInstance(1);

Header 1Header 2Header 3
Header1Header2Header3
Detail1Detail2Detail3
Total1Total2Total3
1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi Mike,

The first mistake you did was saved the form as static, so it was not expanding. Also your code was not correct as hierarchy.

See attached.

https://www.dropbox.com/s/1dk0q7hxi24logd/LCTest%201%20dyn.pdf?dl=0

Thanks

Arvind

View solution in original post

6 Replies

Avatar

Level 10

Hi there,

make sure that your row Detail has the option to add additional instances

Select the row Detail, go in Object Palette > Binding

Check the option to Repeat Row for Each Data Item

TableInstances.png

This should do the trick

Hope this help!

Avatar

Level 3

Thank you for your reply.  Those settings were correct already.  I believe my script is correct, but I cannot understand what else might be preventing the table from expanding.  Any other ideas or willingness to peek at my form to see if you see a problem?

Thanks.

Mike

Avatar

Level 3

You can attach the form on dropbox or similar could and give link here to enable me help you.

Regards

Arvind

Avatar

Level 3

Arvind, thank you very much for the offer of help.  I have been messing around with the designer for quite a few years with good success… but not GREAT success.  I am trying to learn JavaScript programming so that I can implement THAT into my designs but I have only scratched the surface so far.  As you have seen from my email, I have what appears to be a very basic problem (one that I should be able to figure out by myself, but can’t).  If you are WILLING, I actually have 2 issues, the original one with the detail row not populating and another.

I am trying my hand at the JavaScript.  I’m practicing with using variables and writing code.  What I want to do is have a user input their specific data in the table and then ADD another instance.  Then I ask them to input their name in the userName textfield (I typed in a script variable for this field).  Then I want to return them a text box that displays (document.write) to them their total sales for the period ending this quarter, their projected sales for next quarter, and then finally a sentence that states that this report was generated on a specific date and time.

Please KNOW that this is for my learning enjoyment only and if you are unable to assist I will understand  

The link to the file is at http://adobe.ly/1SmpYHt or http://tinyurl.com/pbgn8qc

Can you help me understand how to do this?  Please remember I haven’t written code before and am looking forward to picking up this skill. 

Avatar

Correct answer by
Level 3

Hi Mike,

The first mistake you did was saved the form as static, so it was not expanding. Also your code was not correct as hierarchy.

See attached.

https://www.dropbox.com/s/1dk0q7hxi24logd/LCTest%201%20dyn.pdf?dl=0

Thanks

Arvind

Avatar

Level 3

Arvind, thanks for the update and the corrections.  After seeing your corrections, I should have known better .  Regardless, I wasn't able to find it on my own with everything I have going on, so I owe you my deep thanks .

I look forward to working you again .