1
0
-1

What placeholders are available when writing a rule helper for a native component?


I’ve seen from examples that there’s insert-item which places the data object into the script, but are there any others? I’m mainly interested in getting the item’s ID.

    CommentAdd your comment...

    3 answers

    1.  
      2
      1
      0

      There are two place holders insert-item and insert-id.

      Examples

      Util.hasDescendants(Form.items['insert-id']) will convert to the following if used on an item with an id of "personalDetails"

      Util.hasDescendants(Form.items['personalDetails'])

      Examples

      Util.isBlank(insert-item) will convert to the following if used on an item with an id of "firstName"

      Util.isBlank(data.firstName)
        CommentAdd your comment...
      1.  
        1
        0
        -1


          CommentAdd your comment...
        1.  
          1
          0
          -1

          Hi David,

          insert-item is really all you need.  To get the ID, you can use Form.getItemFromPath('insert-item').id

            CommentAdd your comment...