All Form Element properties should be dynamic

379
2
06-04-2022 09:43 AM
JustinReynolds
Occasional Contributor III

For each property of a form element (group or field) allow their values to accept expressions.  The exceptions to this rule would be the type, input type, fieldName properties. 

While inputType might be fixed, its sub properties might benefit from being dynamic (thinking of dynamic min/max length of a text-box as part of some validation).

The same considerations should be made when introducing new form element properties.

Type: Group

  1. description
    • Add descriptionExpression or allow inline with the description property
      • Same or Similar Arcade Profile as Form Calculation
  2. label
    • Add labelExpression or allow inline with the label property
      • Same or Similar Arcade Profile as Form Calculation
  3. visibilityExpression
    • Already Exists
      • Utilizes Constraint Profile (returns boolean)
  4. initialState 
    • Add initialStateExpression or allow inline with initialState property
      • Must return "expanded" or "collapsed"
      • Or change the property name to "Expanded" and utilize the constraint profile.
      • Use Case:  If all values in a group are complete, collapse the group and expand another

Type: Field

  1. description
    • Add descriptionExpression or allow inline with the description property
      • Same or Similar Arcade Profile as Form Calculation
  2. label
    • Add labelExpression or allow inline with the label property
      • Same or Similar Arcade Profile as Form Calculation
  3. editable
    • Already Exists (See editableExpression)
  4. hint
    • Add hintExpression or allow inline with the hint property
      • Same or Similar Arcade Profile as Form Calculation
  5. editableExpression
    • Already Exists
      • Utilizes Constraint Profile
  6. visibilityExpression
    • Already Exists
      • Utilizes Constraint Profile
  7. requiredExpression
    • Already Exists
      • Utilizes Constraint Profile
  8. valueExpression
    • Already Exists
      • Utilizes Form Calculation Profile

In addtion, many of the expression could be simplified by accepting the {fieldName} notation that we are familiar with in the popup configuration.  This way we could string together the existing values of fields or develop a more dynamic expression with arcade.

2 Comments
SaranehFitzgeraldWP

Would love for fields to accept dynamic expressions! I would use Field Maps much more if this was possible

KPyne
by

Adding my support for this idea! The form title accepts dynamic labeling, I wish other field and group names did as well.

Use case being fields that serve a dual-purpose depending on AssetType.