You are viewing limited content. For full access, please sign in.

Question

Question

Inconsistent results when referencing a table to get specific field data

asked on July 9

Hi all.

I am having trouble displaying field data from a table into a separate field. 

I have this source table;

Rui Deng helped me with code to extract Medical Condition = "Yes" values to a separate table (thanks Rui, that is working well);

Now I am trying to extract these "Yes" values from this table to separate fields so they can be seen individually later in the form. 

But this is what happens; If lines 1 & 3 are "Yes", I see this; (1  copies but not 3)

Calculations used have been added to the value above the field for your reference.

As you can see, row 1 data comes in, but 2 doesn't.

If my data has 3 children with 3 yes values, I see this; (1 & 2 OK but no 3)

If value 1 = No and 2/3 = Yes, similarly the last value is always missing in my individual field.

If there is only one yes value, it's empty.

If anyone could help me to get this working I would really appreciate it!

Thanks.

Regards, Steve

0 0

Replies

replied on July 10

It's likely related with the custom script, as there is no change event triggered after setting the last row value. Change event is needed to trigger formula calculation.

You may find this line in the previous script I provided

$('.table2 .nameField2 input').last().val(nameVal);

And change it to:

$('.table2 .nameField2 input').last().val(nameVal).change();

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.