Getting user input in an action button(approve..get comments)

All of the fields are being updated. As soon as Approve as GM is selected all the fields are updated and the form is saved.
When the “comments” action is selected, the comments are updated and the form

They function fine on their own as actions. I can not keep them as separate actions because once they press one action the form as saved and is not visible to do the 2nd action. So they can enter comments …then the form goes away and they would have to find it to approve, and visa versa

Also I made the syntax suggestions Steve recommended and it is still not working when the actions are grouped.

Thank you for your help

I think I know what you mean.
So I would have to have a comment form for Deny and one for Approve, correct?

I have 3 other approval steps so that would be a lot.

There would be a GM Approver Comments slice with a form view and once that form is saved it would run my Approve GM action

and a GM Approver Comments Denied slice with a form view and once that form is saved it would run my Deny GM Action…?

@llheath
I would do it this way assuming that you have a STATUS and COMMENTS physical columns for your table.


STEP-1


Create a slice of your table, containing only the Key column, Status column and Comments column of your table and set it as UPDATES_ONLY


STEP-2


Create a REF type, Form View based on the slice that you have created above and name it as you line i.e. SET_STATUS


STEP-3


1.) Set a Sequence of actions behaviour for APPROVE and DENY sepearately
2.) First Action: Data > set the value of a column > STATUS > Approved/Denied
3.) Second Action: Data > goto another view within this app >

LINKTOROW([KeyColumn],"SET_STATUS") // SET_STATUS is the ref Form view name

STEP-4


Open your column structure of the table and enter below expression to the Show_if properties of STATUS and COMMENTS columns

CONTEXT("View")="SET_STATUS" // SET_STATUS is the ref Form view name
1 Like

I started to create a test/sample of your workflow. I got to the point of creating the LOOKUP() function for the “Next Approver” field. Is your “Next Approver” field getting properly set by the LOOKUP()?

Could you post the full LOOKUP() function and describe how it is getting the “Next Approver” from your Termination record?

1 Like

you can omit that line

Ok, I created the little tester function and all works as expected. I’ll post a video in a few to show what I’ve done then you can match to yours. By the way, even if I coded a bad LOOKUP() it still navigated to the Comments Form. So, something else is preventing it. Be back in a few.

1 Like

I was thinking you would have an Enum option for the Status that would be selected on the form with the comments. And then your action(s) would conditionally do what you need them to on save.

I was trying to use an icon thumbs up or down on the action, and those do set fields but will not allow for user input in the comment field if i do it like that.

Here is the video demo (sorry for delay…was distracted). I hope this helps!!

I started to implement the approach where a user taps an action, goes directly to a Form, selects Approved/Denied and the other columns are automatically set but hidden.

I’ve realized that from a simplicity perspective that is not a good option.

Understanding that these rows are previously entered and some columns need to be initialized at that time, a developer would need to go through some contortions at Approval time to hide/show columns and would need to set the expressions to “know” when to automatically set the value and when not to. This gets complicated - especially if you are going through multiple levels of approvals.

Your initial workflow of using Actions to automatically set column values and then tailored forms to control user updated columns is MUCH simpler and cleaner. Translation - easier to maintain/change.

Just need to figure out why its not working for you.

Laurie, I’m curious if the video helped you at all?

yes, sorry I thought I responded.
I did have it setup as you did, but in my Grouped action the format rule on the button had a condition “If status=gm approver” and the 1st action in the group action as setting the nextapprover to vpapprover.

I removed the condition on the format and just have to be careful where I “show” it.

The grouped action is doing this:

When I click the icon to approve, the form saves and syncs which takes awhile Then the comment field pops up.

We could live with it but not ideal because most of the time they do not even want to put in comments

Than you for your help with this, I really appreciate it.

1 Like

I think the reason for this is that you have Delayed Sync off. This forces a Sync to occur after every change, apparently even after a change by an Action. If you turn it on, you will likely see the Comments Form immediately.

Also, from my experience, typically when “Approved” is applied no comment is needed but when “Denied” is applied a comment is required.

So you could:

  1. Have “Approve” action just set the fields and skip the comments.
  2. Have “Deny” sets fields and always open the comments form.
  3. Add an “Approve and Comment” action that provides the option to add a comment on approval.