I want to pass `Out_ArrangedData` to On After Fetch event.
But I got "Variable is not defined" all the time...
This case I want to create a general action for all On After Fetch Event so I want to decorate the output and pass it as text for the On After Fetch.
Please if anyone can do this or some alternative ways then please tell me.
Hello,
Remove the input In_ArrangedData parameter and use directly the output of GetTestPackSpools (GetTestPackSpools.Out_ArrangedData) instead.
When creating a general purpose action you must:
Kind regards
Tomasz
Thank @Tomasz M Lipinski,
With your approach then each data action I will need one AfterFetch action.
I want to have only one AfterFetch action because I'll have 1xx of data actions and everything just assign the output of data action into one client variable.
Is there a way to solve this problem? or some how I can categorize the data action with its AfterFetch action for easier to maintain?
Hi,
I think you can achieve this, by setting each of your outputs as an input for the action you'll be using as the after fetch action.
Then on each data action, just set the input value to it's output and every other one to null. Something like this:
Let me know if this sounds reasonable.
Best regards,
José Teixeira
Thank you,
I've try the Out1 like you then when run the variable Out1 is not defined.
I think it because of the mapping is not there when the thread move from data action to client action. Maybe something like <DataActionName>.Out1 can address the mapping but I cannot use it.
I've not know that OutSystems has some kind of garbage collector or some optimizer for this case or not...
This might be a pointless question, but I just want to cover our basis.
Have you confirmed that you're mapping the correct values/data types to all output parameters?
Yes José, in each data action only one output parameter, all is text.
Then in AfterFetch event, the input is text also.
When I use `GetTestPackSpools.Out_ArrangedData` then it worked because the pointer is directly address to data action.
When I use `Out_ArrangedData` then the error "variable out_ArrangedDataOut is not defined" is happened.
Well, it is really ridiculous. Service Studio prompts DataAction's output parameters as legal values for OnAfterFetch event handler parameters. The module can be published but the problem arises runtime - and the name used in the message is quite weird.
Hm, it seems to be some OutSystems' bug and I think you should report it as a support case.