Skip to main content
Nintex Community Menu Bar

Allow only CreatedBy to edit a field

  • February 18, 2019
  • 4 replies
  • 18 views

Forum|alt.badge.img+5

We have looked at several similar posts but have not been able to make it work for our specific requirement. On a task list, we wish to allow only Created By to edit the Due Date. We have tried disabling the control using a rule, and have also tried using the control setting appearance enable expression. Could anyone please tell us if there is a problem with the logic as shown in the attached image?

When trying to use a rule, since the rules disable rather than enable, we used this logic:

not(or(isNewMode,equals(CurrentUser,CreatedBy)))

 

Is the problem that CreatedBy does not yet exist when using the New Item Form? How can we get around that?

Thank you!

 

4 replies

Forum|alt.badge.img+9
  • February 19, 2019
the following rule worked for me, we need to get the PreferredName of the "Current User" to compare directly with the "CreatedBy" value.

not(or(Is New Mode,equals(userProfileLookup(Current User,"PreferredName"),{ItemProperty:Author})))

Forum|alt.badge.img+6
  • Rookie
  • February 19, 2019

Hi There,

 

Looking at the screenshot you attached you are disabling the Field if the Form is not in new mode or the current user is not equal to Created by.

 

I would use Form rules instead of setting it on the control

 

1. Set a form rule on your Date Control which hides the control:

Is Edit Mode&&Current User!==Created By


2. Add a calculated value which displays the date captured in the Date Field and set the reverse of the rule added on your date control so it only shows when in edit mode and current user not equal to Created By.

not(Is Edit Mode&&Current User!==Created By)

 

This way if anyone other than the author edits the item they will not be able to edit the date. 

 

Try it and let us know if it works. 



 

 


Forum|alt.badge.img+5
  • Author
  • February 26, 2019

Thank you @Warwick !


Forum|alt.badge.img+5
  • Author
  • February 26, 2019

Hi @chanteldup ,

Thank you for your reply! I decided to use Warwick's suggestion because for me it seems simpler but I very much appreciate the time you took to respond!