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

Question

Question

formulas not working with values created by Javascript

asked on October 18, 2017

I have a field in my form that totals a column in a table.  It adds the meal types separately and populates related fields outside the table.

I am having trouble with calculations that require the populated value.

Here is a snip of the chart...

I have the Meal column set to calculate the number of each meal type and populate total fields for each type of meal.  This is working.

When I take the totals and try to produce a total cost by multiplying it with an amount, it will not work.

I have tested this by inserting values myself into the total breakfasts, lunches, and dinners fields, and the calculations are perfect.

Manually, the formulas work.  Automatically populated fields will not.

How can I make this function properly?

0 0

Answer

SELECTED ANSWER
replied on October 18, 2017

Try adding .change() to the end of the JavaScript line where you set the value.

For example $('Field1').val('1').change();

0 0
replied on October 18, 2017

Brilliant!

Thanks.

0 0

Replies

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

Sign in to reply to this post.