Has there been any talk about adding rules to the lookup section of a form so that the lookups only fire during a certain process step or stage?
Question
Question
Replies
It was recently brought to my attention that for now, you can cancel lookups with the LFForm object
// When lookup rule 2 is triggered, // if step is "Start", // cancel the lookup call. LFForm.onLookupTrigger(() => { if (LFForm.step.name !== "Start") { return { cancelLookup: true }; } }, { lookupRuleId: 2 });
It has a slightly odd behavior if you are using a single line field with autosuggestions to trigger lookups, but works fine otherwise.
But, the team is doing a refactor of our lookup rules right now so we can better maintain existing and future use cases. Adding conditions to lookups will come after we finish this effort!
There isn't a built in feature for this, but you can use field values to accomplish this by setting your Lookup Rules to a stored procedure with a parameter. For example, if you want a lookup tp run in the second task of a process and you are adding Employee ID based on the ID number, you can add the employee ID to a specific field via workflow or a formula when another field value is met based on the task and let that be the parameter to trigger the lookup.