Allowing only the person assigned the task to mark it as complete

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • In Progress
In my app I have a table of jobs that is related to my table of many tasks. In that table I have a field ("Assigned To") where users can select from a dropdown who to assign it to. The dropdown is populated from a relationship to my Resources table. I'd like to have only the assignee be able to mark the task as complete or at least people within the same role. How can I do this? Thanks in advance!
Photo of Nathan Allan

Nathan Allan

  • 112 Points 100 badge 2x thumb

Posted 2 months ago

  • 0
  • 1
how do users mark the task as complete. Is this a dropdown/checkbox? or are you using a magic button to do this?

If the user is directly editing a field to mark this as complete, your only option is a form rule.

I'd recommend making a "Complete Task" magic button that changes whatever field/value you're using now, and you can limit that button to only display for the assignee.

We'll say for this example your users have a checkbox called "Complete".....

om the example below, xx is the field id for the tasks tables record ID, and zz is the field ID for your "Complete" checkbox. For convenience, this example has a js string to allow this button to reload the page the button was pressed on so it can be placed in reports, dashboards etc.

var text URL=URLRoot() & "db/" & [_DBID_TASKS] & "?a=API_EdotRecord&AppToken=yourapptokengoeshere&_fid_xx=" & URLEncode ([Record ID#])& "&_fid_zz=1" & "&z=" & Rurl();

var text jsAction="javascript:"&"$.get('" &$URL& "',function(){" &"location.reload(true);" &"});" & "void(0);";

If(User()=[Assignee], $jsaction , "")

Hope this helps!

Shawn M. Renn, Jr.

Certified Quick Base Platform Developer / Sales Engineer

440-201-6050 Ext. 307

srenn@mcftech.com

MCFTech Solutions | Business Wise, Technology Savvy
Photo of Ryan Stanford

Ryan Stanford

  • 1,692 Points 1k badge 2x thumb
The dynamic form rule would be pretty straight forward... add a criteria where if [user] is in the [Assigned User] make editable the complete checkbox.

I will say that either one of these methods will work.
(Edited)
Photo of Nathan Allan

Nathan Allan

  • 112 Points 100 badge 2x thumb
Thank you both of you. It worked out when I created a custom rule for a role to modify certain records only when the assigned to Dropdown field was equal to the user. 

Ryan, unfortuantely I couldn't figure out your solution. When I go to create a dynamic form rule. I can select when user, but the only option at that point is to select "is in the role" or "is not in the role". It's not possible to relate the user to the value in "Assigned To" Field. Also true the opposite way when Assigned to "is equal to" the next field doesn't give me an option of user. This would have been my preferred solution, but since it didn't work out. The other way works too. 

Thanks for your help!
Photo of Ryan Stanford

Ryan Stanford

  • 1,692 Points 1k badge 2x thumb
Hey Nathan... I tested the exact way to do this, as I know we've done it with Dynamic form rules...

The way to do this is as follows:

Condition:
[Assigned User] includes [The current user]

Action:

[Make editable] [Checkbox]