62
Views
4
Comments
Data inconsistent in Server Action

Hi guys!


I have this huge problem and dont know how to fix it. I have tried many thing to resolve this, including creating another action with the same purpose, deleting dependencies, using local variables, etc. None seems to work...

I have this action where i have this initial data as 2000. Then i make some simple math and turn those 2000 in 7000 like we can see in the print below.

when my data arrives that server action after the "LogMessage", the data is inconsistent, seems like its ignoring my last update on that action (the simple math logic), since the data displayed is 200 instead of 7000.

After that i tried to debbug on diferent way with that logg message and what i got is this.

Before i introduce the logg message i could only notice the problem debugging the input of the other action that was on another module. When i introduced it i realized the problem is inside this action i m showing.

As we can see after the serielize the value updates to the "server value" and the data remains the original one, creating this inconsistent data problem.


I hope i managed to explain this properly and someone had experienced this already so i can get a way to workaround this!

2023-08-18 10-40-36
Deepak M

Hi João Espinheira ,

This is a very interesting and unusual behavior.

Before changing the Initial variable value, create a new local variable and do all the calculations on that. When you get to the JSONSerialize part, use New local variable instead of Initial.

UserImage.jpg
João Espinheira

Hi Deepak,

I used local variables for the calculations, then i assigned it to my structure

2020-07-29 19-08-40
Sanjay Kumar Sahu

Hello João Espinheira,

As far as I see your snap, I think your last action in flow might not be taking input from JSONSerialize1, remember, JSONSerialize is just an action between the flow it won't convert any local variable data, rather it provide Serialized data in output so you need to take that Output as input of your server action. Ex: MyServerAction:Input -> JSONSerialize1.Output

Another Opinion: If your response is coming from a Rest API, I would like to suggest to Customize your response in OnAfterResponse method using CustomizedResponse output param. This won't fail.

Hope it helps!

2018-12-10 12-16-21
Goncalo Duarte Almeida

Hello @João Espinheira 

That behaviour it's very strange. I not easy to see because you have some relevant information hidden and I understand why.

What I suggest is to create a new sandbox application isolating that action and see if it has the same behaviour, and with this I think you can share more information in order we can help you better.

Regards

Gonçalo Almeida

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.