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

llheath
Participant V

I have two actions Approve and Deny. I want the supervisor to have the opportunity to enter comments when they approve or deny. I could not see anyway to have a popup show up when they hit the approve or deny button that would prompt for comments.

I did try creating another action “comments” and it uses a slice that has just the record id and comments.And I use a LINKTOROW([Recordid], “Comments”)

If the user selects that action first - they can type in comments, then it goes back to the form and tehy can hit the approve action(thumbs up)…that is not going to work.
I want the comment action to come right after the deny or approve action…wish it could all be in one.

0 32 2,768
32 REPLIES 32

You can do that. I think you want to use Grouped actions. This is a special action that allows you “run” several other actions together.

You would still have two visible actions just that they both would be of the Grouped action variety.

One sets “Approved” value and then navigates to the FORM using your `LINKTOROW([Recordid], “Comments”)’

The second sets “Denied” value then uses the SAME action to navigate to the FORM for comments.

Don’t forget to move the criteria that hides/shows the actions into your new Grouped Actions.

I hope this makes sense. If not, just ask.

i created a group action

the first action is Approve which is this type of action:

data: set the values of some columns in this row…

I have it set fields" like approval=approve

That is working and is updating the fields

then the next action is
Comment:

App: go to another view with this app

and that is the form view of the slice with just the comment field.

with this action: LINKTOROW([Recordid], “GMComments”)

When I have it in the “grouped action” the Comment form window never comes up

Hmmm.

First, try this instead LINKTOROW([_THISROW], “GMComments”)

[_THISROW], if you don’t know, is a special reserved keyword.

no does the same thing, never goes to the comment form.
I even tried switching the order.
When I made the comment form 1st in order of the grouped actions. The Comments did come up and took my comments, but the GM approve action didn’t run I can tell because the fields are not updated

Yes, when you navigate to a view, that basically ends the Grouped Action. As long as the view navigation is last, it should be good.

So the correct Form was displayed when you had the Comment Action first?

Can you double check that there is nothing in the “Only if this condition is true” field for the Comment Action.

Beyond that I would need to see what you have. If you could post images of the Slice, Form view and the Comment Action, that might help.

whatever action is first runs…
is it a Sync? or something
So when I had comments first, that action works
and Approval first, it approved but did not run the comment action.

I’m not sure what is happening for you.

I have probably a dozen grouped actions in a single app that do something and then launch a form based on slice (a couple below). So it is definitely doable.

I would need to see the details. There is something not set right

But what about @Bahbus suggestion? Just launch into the Form and have both the Approve/Deny buttons there as well as the Comments field. In the end it is the same result.


here are screenshots of my 2 actions and them grouped together.

(Attachment groupaction.pdf is missing)

The PDF didn’t make it through.

2X_c_caa317f415bff59ae8cb781f18089fd27b9ada9f.jpeg
WillowMobileSystems

        John Baer




    March 24

You can do that. I think you want to use Grouped actions. This is a special action that allows you “run” several other actions together.

You would still have two visible actions just that they both would be of the Grouped action variety.

One sets “Approved” value and then navigates to the FORM using your `LINKTOROW([Recordid], “Comments”)’

The second sets “Denied” value then uses the SAME action to navigate to the FORM for comments.

Don’t forget to move the criteria that hides/shows the actions into your new Grouped Actions.

I hope this makes sense. If not, just ask.


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Bahbus
Participant V

Why are you using LINKTOROW instead of LINKTOFORM? You should setup a new form that only the supervisors can access. That form only has Approval (maybe as buttons) and Comments (long text). Then you don’t even need to use an action to set Approval or slices. Ezpz.

I believe the comment needs to be entered on an existing row. As far as I know, LINKTOFORM() is for new rows only. Am I wrong?

If not, LINKTOROW() still would be needed to get the correct row to the Form.

I see your point about just launching the Form straight away have the Approve/Deny buttons and a comment field on it. That is another way.

Steve
Participant V

You are correct.

@Steve, sine you are here. Do you know if a LOOKUP() will halt a Grouped Action?

It will not.

In my experience, a grouped action stops if a navigation action occurs or if an error occurs with one of the actions. In this case, I suggest verifying all of the column values the Data: set the values of some columns in this row are valid. Notably: enclose the Text values in quotes (e.g., "Approve", "With VP Approval"), and prefix the first argument of that LOOKUP() with [_THISROW]..

I’m out for tonight. Good luck!

In that case, same thing but with the LINKTOROW(). Use that to go to a form that is only Approval and Comments. The supervisor then selects the approval and writes in the comments before save. Then you avoid the group action altogether.

llheath
Participant V

Both of these actions work perfectly on their own. The linktorow Is in the Comment action and by itself works perfectly, it updates the row. The GM Approval updates also, but after selected it closes the form.
I think that is why on a grouped action it is not working.
2X_9_98b4d430d3caadc870238763786440d9dce28f7f.jpeg

Alternate solution: use the Approve as GM data setting action as the action for when the comment form is saved.

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

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?

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.

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!!

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.

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.

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.

I’m unclear what you mean by this. Are you saying that only GM Approval updates but none of the other three fields get updated. For example, is GMSignature getting updated with the USEREMAIL()?

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

Top Labels in this Space