Button on click action when condition doesn't work

I have several action set to run when user click button, and when there is no error message then run “Open Assignment”.

I set when condition on it with property, when it’s “true” then “Open Assignment”. And the property is generated from activity that run on Refresh-This-Section Activity.

The problem is it can’t read the property value, so when the property value is true it doesn’t run the “Open Assignment”

@FerdinandAlvisK

When conditions on action set do not work on real-time. If works on the property values present at the last scree refresh. If your pyWorkPage.Flag==true is set in some of the before actions, it won’t be able to recognize. You need to perform a refresh screen after the property value update so that the new value is referred on the when rule.

If the above scenario satisfies your logic, the trace and find out the value of Flag on the pyWorkPage at that instant.

@SohamM95 

I can’t do screen refresh, because I have a stored procedure running on the Refresh-This-Section Activity, So if the stored procedure returns any error message then pyWorkPage.Flag will remain “false”.

It will change to “true” only if there are no error message from the sections and stored procedures.

Is there any other way to read the property for when condition?

or there may be a script to prevent the action set from being executed if an error occurs?

@FerdinandAlvisK - Place hidden control on the same screen and provide property pyFlag to update the data on the client side. Here only server side the data is updated due to which its not executing the when condition.

Thank you.

@Priyanka Boga Well I’m going to try this Solution, Or maybe there is way to Open Assignment from activity?

I’ve tried to use “Call Work-. Perform”, “Call Work-. Open” and pass the inskey but it didn’t work.

The screen is blank whenever i used those two activity.

@Priyanka Boga

Hi, Thanks for your solution

Now it works fine, I put a hidden control with a property that i use on when condition

@FerdinandAlvisK

Can you try using ajax refresh?