Create Calculation Field with Api - What is the variable format for @All of Map?

Answered

Comments

2 comments

  • Andreas Garnæs

    Hi Scott,

    The format is in_VALUEID_REFERENCEID, where VALUEID is a field id in the related app with the values you want and REFERENCEID is the field id of the relationship field in the other app (since it's incoming references). To explain, consider the following scenario:

    • An app Products
    • An app Components with a relationship field pointing to Products (field id 1) and a number field Price (field id 2).

    Assume we were to add a calculation field on Products to iterate over all component prices. We would then do:

    var prices = @[All of Prices](in_2_1);
    // more code here
    

    I hope the above makes sense.

    Best,
    Andreas

    1
    Comment actions Permalink
  • Scott Costello

    Thanks Andreas! That makes sense

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk