How to use return values in Processes

So I set a return value as follow

Then in next โ€œTest Processโ€, I call the โ€œTest set variableโ€

Then I check the return value set in โ€œTest set variableโ€

Thereโ€™s no error in the expression assistant window

But after saving the app, I get the following error

Any idea?
Thanks

1 11 1,138
11 REPLIES 11

DSB
New Member

I wish I could help you but I too am in the dark as to how variables are pass back and forth. Given the โ€œTest set variableโ€ process and the โ€œTest set variableโ€ step have the same name, have you tried giving them different names? I have no idea if AppSheet is trying to call [Test] from the step or the process.

Not to hijack your thread but to answer a question with another question, do you have any knowledge as to how AppSheet would read in the ID valuable you are passing into the โ€œTest set variableโ€ process from the process side? Would that be [Test set variable].[ID] given you named the step the same as the process?

I hope I am of help and not just adding to the confusion.

I rename the step โ€œTest set variableโ€ to โ€œUse the variableโ€. I still got the same issue.
3X_0_5_057c3604ee64b3867c9bfc4d2342dc963f0afcc2.png

For your another point, only work if I call [Use the variable].[Test]. If I change the call to [Test set variable].[Test], I got expression error.

You simply read it as the current rowโ€™s [ID]. At that point, the context in which the process run will be referenced to ID set in โ€œUse the variableโ€ step.

Hi @Steve , can you please help us with this? Thanks

I have no experience with Automation, so I really have very little to offer here. Perhaps @prithpal has some insight?

OK. Thanks

Hi Steven,

The errors seem to suggest something is not right about the Event configuration.
Have you defined any Events?

Thanks!

@Steven_Aung I think I am able to reproduce now.
It has something to do with the โ€œ[Use this variable].[TEST]โ€ expression being used in a โ€œWait for a conditionโ€ step.
If you use a โ€œBranch on a conditionโ€ step instead, it should work.

For the โ€œWait for a conditionโ€ step, the condition is meant for the input entity (for example, the columns in your โ€œitemsโ€ table).
In the example that you showed above, you should use a โ€œBranch on a conditionโ€ step.

Thanks!

Yes, so far I have only been able to pass a step process returned value to step conditional branch. Does not currently work from process to process or any other step that I am aware of.

Can this feature be added? Would really open up doors for capability with Appsheet.

Hi Liam,

You can also pass a call-process-step returned value to another call-process-step.

But yes, we are aware of and will be working on the feature request to support step references for more step types other than โ€œbranch on a conditionโ€ and โ€œcall a processโ€.

Hi @Zhifeng_Lin ,

Thanks for the reply. I tested it in โ€œBranch on a conditionโ€ and it worked. As a workaround, I can replace the return step with an action that will assign the value to a temporary column, and then use the column value in โ€œwait for a conditionโ€ check.

It will be nice if you can list available return variables from previous steps in โ€œExpression Assistantโ€ when they can be used. That way, users can clear see when and where they can access those return values. Thanks.

Top Labels in this Space