Refreshing submit button

Hi,

I have several DB tasks shown in a to-do list, where it is possible to reassign these tasks to other users. I need to ensure, just before submitting any task, to check if meanwhile a user has been filling the form, anyone has reassigned that task to another user. In that case, if the user click into the "Complete" button, the task can´t be submitted and a warning must be shown in the form.

My approach was create a rule that check the if loggedInUser() match with the user in the column of these record, returning a boolean. When I clicked into the "Complete" button, the rule must be executed and decide if I can submit the task or not.The problem is that that rule is execute just once when the user open the task and I can't find a way to force the execution of therule every time I click into the button. In some tasks there is no option for the user to insert data, only display information and complete the task so refreshing that rule everytime the user change data in the form doesn´t work for that cases

Any ideas?

Thanks!

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    You could always set up a refresh variable (at the shortest interval of ~30 seconds) to periodically recheck the assignee value from the DB, in such a way that if it changes, the form and/or its buttons are disabled (preferably while advising the user that it's no longer under their ownership and that they can click away).

    Please note that this implementation is a bit outside of Appian's usual assignment system, so one way or another you'll probably have to settle for an imperfect work-around.

  • You are right, all these solutions are imperfect. Refreshing only every 30 secs imply that if the user complete the form in > 30 secs, the variable won´t be refreshed. I will try to create a case in MyAppian requesting a native solution for that scenario.

    Thanks for your response

Reply Children
  • 0
    Certified Lead Developer
    in reply to ab2370

    A failsafe would be to add a manual check in a process node immediately after the form is submitted, and if the assignment had changed, route the user to an advisory task and don't write any of their changes to the DB/etc.  That is in the off chance that reassignment occurs 30 seconds or less before the user was otherwise about to submit their task (possible, but probably not a very high risk).