Create Calculation Field with Api - What is the variable format for @All of Map?
AnsweredI'm trying to use the API to create a Calculation field that references a relationship field. If I were to create the calculation within Podio itself I would do...
var a = @All of Properties;
Now in the API it looks like the format would be...
var a = @All of Properties;
what do the 2 different numbers here represent? If I search through the source it appears that the first number is equal to the ID of the first field of the related app. While the second number seems to match up with a value here...
<option value="105045937" data-reactid=".0.0.1.0.0.2.1.0.1:$app.$2">.</option>
...which is a number I don't know where or how to get.
Any help would be appreciated.
-
Hi Scott,
The format is
in_VALUEID_REFERENCEID
, whereVALUEID
is a field id in the related app with the values you want andREFERENCEID
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 toProducts
(field id 1) and a number fieldPrice
(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 - An app
Please sign in to leave a comment.
Comments
2 comments