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

Question

Posted to Laserfiche Cloud

Question

Finding Rule IDs (and Forms IDs) in Cloud

asked on July 19, 2021 Show version history

I've got a Form where I need to be able to identify a lookup in order to trigger some javascript to run after the rule is completed. I'm planning on using the "onloadlookupfinisher" event to do this, but I'm stuck on identifying the rule ID.

According to the current Laserfiche Cloud help documentation the way to identify the rule ID is a 2 step process.

1. Find your form ID by substituting your information in the following URL template

https://yourFormServer/Forms/design/layout/yourFormId

 

2. Once you have the form ID from the URL in step 1, find the rule ID by substituting your information in the following URL template to view the API JSON file that will show the rule IDs.

https://yourFormsServer/Forms/api/lookup/lookup?formId=yourFormId

 

The challenge is for step 1, the Cloud form editing URL scheme is completely different. When I open a form for editing the URL is something like this:
https://app.laserfiche.com/bpm/home/_global/bp/bpformsdesigner/FormBuilder/ad7a0137-5fd4-4641-b7a5-e7c2d05d6367/ad1f013d-cfa0-4378-a026-465ce227bbrr/false

(GUIDs have been randomly changed to preserve privacy)

I tried using "app.laserfiche.com" as my forms server, and several combinations of the apparent GUIDs for the Form IDs to see if I can view the API info, but wasn't able to figure it out.

So I'm wondering how to properly find the rule IDs for Cloud Forms?

 

 

 

 

0 0

Answer

SELECTED ANSWER
replied on July 20, 2021 Show version history

After all the lookups have been processed on page load we send out a trigger:

$.event.trigger({
type: 'onloadlookupfinished'
});
which you can use without having to know the ids.

 

A good way to get the Ids is to load the form and type jsonForm in the console.  You can retrieve all the data of the form.  Lookups are located in the businessRules property. 

When we call a lookup we do this:

$.event.trigger(
ruleId: "ca90bbb5-68dc-4218-a408-40077306742c",   <-- replace with your id
triggerId: "Field3",   <--this is the field that triggers the lookup
type: "lookupstarted",
})

when the lookup returns:

$.event.trigger({
ruleId: "ca90bbb5-68dc-4218-a408-40077306742c", <-- replace with your id
triggerId: "Field3", <--this is the field that triggers the lookup
type: "lookupcomplete",
})

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.