Hello Community,
We have a form that we modify to bring in all of our interfaces. Most of them pull json from a REST api.
This interface will need to GET and UPDATE methods from a SQL table and will trigger off of the process ID.
Expression:
takes 2 inputs: the current process id and a key that will allow me to pull specific data out of the json.
My Question: How do I pass the forms process ID into the expression? Here is the start of my rule to pull in the interface into the form:
rule!TEST_ReviewsList(rule!CORE_GetProcessDataByKey(wfProcessId: "47" , key: "comment"))
Thanks,David
Discussion posts and replies are publicly visible
This is confusing ... You talk about APIs, JSON, SQL, Processes, Interfaces.
Your question: "How do I pass the forms process ID into the expression?"
- A form does not have a process id
- Which expression?
Maybe you can help me understand ...
Hello Stefan,
I was trying to explain the details of the form...the APIs may be irrelevant to this question.
I have an expression that I need to use to populate a GRID. The expression in the screen shot above takes 2 inputs, the ProcessID and a Key word that will allow me to populate a local variable with a values.
I'm used to working with Forms that have some sort of Process ID to populate the data so some of my wording may not fit the appian model.
Pulling data into an interface with an expression is new to me. If I have an interface called "rule!TEST_ReviewsList" and I need to use that expression to load the data.
I am still not sure where you are stuck at. But you would use a!queryRecordType to load data.
davida0024
Where do you store/hold process ID? E.g. if it is into local variable local!procID then you need to pass that like.
rule!TEST_ReviewsList(rule!CORE_GetProcessDataByKey(wfProcessId: local!procID , key: "comment"))
Hello Abhay,
Thank you...I think that's getting me in the right direction.
I don't currently store the procID, I'll try to figure out a way to see if I can bring it in.
Yes. retrieve the procIDs from the source, save it in the local variable and then call the rule with the procID as the parameter. If there are multiple procIDs you need to either change the rule to have the logic to handle the multiple inputs or you can call the rules multiple times using forEach()