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

Question

Question

Ticking a radio box via lookup in Modern Forms Designer

asked on February 16, 2023

Hi,

Just wondering if there is any way to tick a radio box in the modern forms designer, using a value from a lookup (either by script or lookup rules)?

When I open up the lookup rules, my radio buttons don't seem to appear to be showing up and I can only see the dropdown menus or input fields.

Any assistance would be greatly appreciated. Thanks!

0 0

Answer

SELECTED ANSWER
replied on February 16, 2023

Hi Jay,

Radio buttons type is not supported in lookup rule for new designer, but you can do it with in Forms 11 Update 3, where the new designer supports the Javascript feature, and use a combination of onLookupDone(handler, options) and setFieldValues(id,value) functions, you can refer to https://doc.laserfiche.com/laserfiche.documentation/en-us/Default.htm#../Subsystems/ProcessAutomation/Content/Forms-Current/Javascript-and-CSS/TheLFFormObject.htm for all functions that can be utilized.

Here is an example how I make it work:

LFForm.onLookupDone(function () { 
  //change to any condition you like
  if(LFForm.getFieldValues({fieldId:4})==1){
  LFForm.setFieldValues({fieldId:2}, {value: "Choice 1"});}
  
}, {lookupRuleId: 1});

The fieldId: 4 is a Single Line to be filled by lookup rule, fieldId:2 is a Radio Button field.

Once the lookup rule is done, it first check the value from fieldId: 4, and when it meets some conditions, set the proper option to the radio button.

 

1 0
replied on November 29, 2023 Show version history

We have a table that a lookup populates 4 rows of data.

When we try this code, the array returned is empty. Console log shows the returned Array as containing the following.  " "," "," "," "

Is there something additionally that needs to be added as the field appears in a table?

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.