0 votes

Efficy 11.2 comes with RPC functions variable

Could someone describe me a use case of this operation? I honestly have no idea what it could be used for

asked in WorkFlow / Serverscript by (6.8k points)

1 Answer

+1 vote

The goal is to create "variables" that are stored for the duration of the RPC request.

This can be useful if the request contains several operations (e.g. create a Company, then do something with the created company), and you need to pass a value from an operation (e.g. the key of the created Company) to the next operation.

You can use the variables by enclosing their name between $$ tokens ($$xxxx$$).

For example, inside the company "edit" for creating the company you would add the following to store the company key:

{"@name": "variable", "name":"companyKey", "kind":"field", "fieldname":"K_COMPANY"}

To reuse the value later, e.g. in a "addlink", you could do the following:

{"@name": "addlink", "entity": "Cont", "key": "33", "detail": "Comp", "detailkey": "$$companyKey$$"}
answered by (836 points)
Wow, that's interesting!
This feature has been available since 2006, unfortunately without being documented. I guess it's never really been used :(.
1,167 questions
1,425 answers
325 users