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

Question

Question

Lookup rules applied to tasks as well as initial submission

asked on February 1, 2024

I have a lookup rule that populates a table in forms from a simple table. If I load a new instance of the form it loads all the data from the lookup rule, but if I submit and open my task, the lookup rule does not run and add new data from the table, it shows show what was previously submitted.

It is not clear to me in the lookup rules configuration when these lookup rules run, it appears to only be on the starting step and not in user tasks.

Is there any way to have a table that is updated each time the form is loaded in any task with any new data that has been added to the table?

 

0 0

Answer

SELECTED ANSWER
replied on February 1, 2024

You're correct. In this case, you may need to also have a lookup rule with a where clause to be able to force a lookup when that field is updated. I don't know of another way to force it to run again.

0 0

Replies

replied on February 1, 2024

I believe you'd have to manually trigger a change on the field that is used for the lookup rule using Javascript to force it to run.

Manually trigger lookup rule - Laserfiche Answers

0 0
replied on February 1, 2024

Not sure I understand. The lookup rule populates the fields in the table, do you mean trigger a change on any random field in the table? That certainly will not cause a rule to run even if I do it manually

You might be thinking of rules with where clauses.

0 0
SELECTED ANSWER
replied on February 1, 2024

You're correct. In this case, you may need to also have a lookup rule with a where clause to be able to force a lookup when that field is updated. I don't know of another way to force it to run again.

0 0
replied on February 1, 2024

That works! I did not have any luck with $('.trigger input').trigger('change');

But the following does work

 $('.trigger input').val($('.trigger input').val()+'a').change();

For the rule I added where X does not equal and threw some random value at it.

Would be useful just to have an option on the rule to lookup for every form load.

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

Sign in to reply to this post.