Edit a variable while approving an item via the portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2020 08:53 AM
I have a requirement that an approval is sent to someone, and before they approve or reject, they need to fill in a variable on the form for the next approver.
I have the workflow waiting for that field to not be empty, and then when it has a value, sends it off to the new person for approval. But the problem is I don't know how to let the person edit that variable from the portal.
The approver needs to (from the portal) see the variables on the form. And all need to be read-only except the one. And then when that is filled in, they can approve the request (or they could reject without choosing another approver).
I'm not very good at coding widgets. I can tweak them a little sometimes, but I this is beyond my abilities. Has anyone done something like this that has code they can share?
Thanks,
Shannon
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2020 09:17 AM
So, I just had a somewhat similar issue. I had no make all variables read-only in the portal. There is a widget that helped me greatly:
The way I ended up handling this was embedding the widget above, then setting it to read only via a view pulled from the URL. You could probably do something like this, then maybe mimc the g_form setVariableReadOnly(false) function with your own to make the one field editable. See Jace Benson's answer here:
There are probably other, easier ways to do this. I don't have any code available off-hand but I would look into the variable editor widget and maybe creating a view. Hope that helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 07:00 AM
I think this is what I'm going to have to do - give them a link to get to a page where all the fields are read only except that one. Then they should be able to approve after that is set, but I'm not sure how to make that part more seamless - like create a button to take them to the approve from there. Like I said, not great at coding. But I guess I will continue to chip away until I get it to a useful state.
The variable editor screen does look nice, I'd even consider that being the normal approval screen (better than the default summarizer).
Thanks for the help!
Shannon