My problem is pretty straight forward but also very annoying. For some reason that i just can't put my finger on - I'm unable to assign a local variable in a client action the value of a server action that is inside said client action. When debugging, the Server action is able to assign the values to the output parameter, but once leaving the server action screen to the client screen - it shows as if the value of the server action output is 0. I'm adding pictures to better visualize the problem.
In this picture - after fetching the data and assigning it to the output parameters, right before the end, the output parameters contain the correct values
when existing the server action back to the client action - the output parameters are 0!
thanks in advance, i feel completely stuck, any kind of help would be much appreciated.
Hello Komal,
Yes it will happen, @CincoMariposas Check this screenshot
I am also loosing the value.
But when i take a local variable with same structure type i get the value
Because i mapped the local variable with table widget
Hope this clears the scenario!
Thanks,
Krunal
Hey Kurnal,
I will look this up, in the meantime I put all of the server action in a new client action, and this client action into the first client action - now everything works
Hello Cinco,
Following thread addresses a very similar issue like this:-
https://www.outsystems.com/forums/discussion/65217/loss-of-data-returned-by-server-action/
Please check it out, i hope it helps you!
Hi Cinco,
Are you able to share your OML,
I have same this way and get the out ,
Kind Regards,
Hey Komal thanks for you help
Sadly sicne there is some personal data on the app, i'd rather not share the oml (removing said data would be a bit of a hassle)
still, here are all the pictures of all the parts of the action
Are you using structure to return the data from server action?
i tried both, once as a structer with an attribute of integer, and once as an output parameter type integer - both return empty
I tired too with structure and it returns value,
i did not get one thing,
In above screenshot why current.position is there ??
As it already gave you the link.
Platform does some internal optimization if the parameters you are returning not mapped to certain UI components or logics.
So they will loose the value.
Please check the thread.
Hi Krunal,
In Cinco's case, he has mapped the both output parameter to the local variable, still there is chance to loose the data??