Skip to main content

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?

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.


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.


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.


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"),””)


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 

 

 

 

 


Reply