I am trying to use a refreshVariable with refreshAfter: "RECORD_ACTION" in a Task From, but the variable does not get refreshed.
Is the use of refreshAfter: "RECORD_ACTION" only possible in a record form, or am I missing something.
I start my from with:
local!contractVersion : a!refreshVariable(
And in the middle of the form there is a recordActionField:
the record action is executing without a problem, but the refreshvarable is not working.
I believe you have to set your record action to open in a dialog. Per the documentation: Finally, you can configure a local variable to refresh after a record action, such as a related action or a record list action, configured within a record type object that completes from a dialog window within the Record Action Component.
Is this refresh behavior even still needed when opening a record action in the same tab (i.e. the old way)? AFAIK upon returning to the originating interface, variables would be refreshed anyway.
I just tested when I change to open in same tab. (I actually did not test this before since I was not expecting it to work correctly from a task form)
When choosing "open in same tab" it works since as you suggest, the complete interface is refreshed.
This however does not solve the orignal problem / bug. since this refresh mechanism was introduced to be able to use the "open in tab" behaviour
I agree, we do need a way to refresh upon completion of an on-form pop-up dialog; though suddenly i'm unclear if you're referring to the pop-up dialog or the "open in new tab" version, which I don't believe it's feasible to add any autorefreshing behavior to, since the original interface will stay open and unchanged while the action opens in a new tab, and will have no inherent way in knowing when (or even if) the action is completed.
I haven't had a chance yet to test the autrefresh behavior when completing an action in a dialog -- based on the documentation i'd expect it to work but of course there's always the chance that something isn't working correctly with it.
The one thing I'd suggest (just in general) is that you should double check that your process model is set to chain all the way through the DB write(s) that affect the value that you're hoping to refresh. If it's not, then I would expect it might be attempting to refresh *before* the DB write has been completed.
The process model is chained completely.
When I use "Open in same tab" it refreshes as expected.But when I use the new refresh mechanism in combination with open in dialog. (see code snipped above) it does not work.
Ok, thanks for confirming -- this seems like a potential Appian bug, I'll let Peter Lewis take it from here I think.
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.