Skip to main content
Nintex Community Menu Bar
Question

Current user field overrides everytime form is edited

  • Oct 16, 2024 5:24 PM UTC
  • 7 replies
  • 136 views
  • Translate All

Forum|alt.badge.img+2

Hi!

I have an if formula that returns the current user and date when specific check box is checked by a used

below is formula

IF((Post 2 Pellet visual qual trainer==true), (userProfileLookup(Current User “PreferredName”)+"

*+formatDate (Current Date, "MM/dd/yyyy"),””)

 

my problem is, when a different user goes to edit the form, their name overrides the original users name, so now there’s no way to know who checked the box initially.

is there a way I can edit the formula so that once the field is filled, it won’t override with another users name?

7 replies

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • Oct 16, 2024 11:50 PM UTC

Hi @AndrewDo,

If you use a calculated value control, you can configure it not to calculate in Edit mode.
 


If the checkbox is being checked in edit mode, you must set another value when it’s initially checked and check this value in your formula for future edits.

Translate

Forum|alt.badge.img+2
  • Author
  • Rookie
  • Oct 17, 2024 12:17 AM UTC

Yes my form has multiple checkboxes for a trainer and a trainee. So the person would have to go into edit mode to check their boxes. But do so without the other persons name getting overwritten.

 

can you explain this more? I’m not really following

If the checkbox is being checked in edit mode, you must set another value when it’s initially checked and check this value in your formula for future edits.

Translate

Forum|alt.badge.img+2
  • Author
  • Rookie
  • Oct 17, 2024 1:35 AM UTC

Hi @SimonMuntz 

Yes my form has multiple checkboxes for a trainer and a trainee. So the person would have to go into edit mode to check their boxes. But do so without the other persons name getting overwritten.

 

can you explain this more? I’m not really following

If the checkbox is being checked in edit mode, you must set another value when it’s initially checked and check this value in your formula for future edits.

Translate

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • Oct 17, 2024 3:06 AM UTC

Hi @AndrewDo,

Thank you for your clarification.
When the box is ticked, you have a rule that sets a variable to 1. This variable is connected to a column in SharePoint. Or even simpler, just connect the column check box to a column in sharepoint and check if its true.

Then you just add this to your formula.
 

IF((Post 2 Pellet visual qual trainer==true&&column name != 1), (userProfileLookup(Current User “PreferredName”)+"

*+formatDate (Current Date, "MM/dd/yyyy"),””)

Or 

IF((Post 2 Pellet visual qual trainer==true&&CheckBox column !=true), (userProfileLookup(Current User “PreferredName”)+"

*+formatDate (Current Date, "MM/dd/yyyy"),””)

Translate

Forum|alt.badge.img+2
  • Author
  • Rookie
  • Oct 17, 2024 8:01 AM UTC

Hi @SimonMuntz 

thanksnfor helping me out with this. I’ll try some things out based on your second suggestion.

for more context,

Let’s say I have to check box variables.

one is named Post 2 Pellet visual qual trainer which the trainer goes in and checks

and the other is named Post 2 Pellet visual qual trainee which the trainee would later go in and check.

 

Next to these check boxes are variables with my if formula that returns the current user/date if the checkbox is checked

idealy what happens, is the trainer goes in and checks their boxes so that their name populates next to it.

then the trainee goes into the form and checks their boxes so that their name populates 

this way now when anyone views the dorm they can see who the trainer and trainee were and when they checked their respected boxes.

 

The problem wiith my current formula is, when the trainee or anyone else goes to edit the form, their name overrides the trainer’s name who has checked their trainer box first. This is because technically the condition for the if system are are still true so formula ends up pulling the current user and overrides whatever was there previously. 
Now I’m not able to trace back who the original trainer is.

does that make sense? Sorry if if not being very clear.

 

just making sure I understand, with your suggestion I would connect the checkbox to another sharepoint column called checkbox column?

and then the if statement would look to see if the check box is checked and if the connected checkbox column does not equal true?

and this should work because checkbox column should be  blank at the time the box is checked so both conditions will be true for the user name to populate.

i think I had tried something similar but the problem I was facing then was when someone else went to edit the form afterwards, the field ended up blanking itself. I’m assuming it’s because now the checkbox column was saying true so when the formula recalculated, both of the conditions were not met anymore 

 

 

 

 

Translate

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • Oct 21, 2024 9:58 PM UTC

H @AndrewDo,

 

It sounds like you understand the concept I am explaining.
If done correctly, the SharePoint column value should not change. It should be set when the checkbox is checked, and no configuration should be allowed to override it.
 

Translate

MillaZ
Nintex Employee
Forum|alt.badge.img+23
  • Nintex Employee
  • Oct 28, 2024 10:15 AM UTC

Hi @AndrewDo 
Has your question been answered?

Translate