1

I am creating a project tracking list using Sharepoint-online.

I'd like the Status column to default to "Requested", so, in the column definition, I've set that as the default value from the list of available Status I've defined (Choice field, not a Lookup).

When I created a new "NewItem" form, I did not include the "Status" column. When I attempt to save the form, my validation fires telling me that some data is missing.

Unfortunately, the validation is supposed to trigger when the Status column = "Migrate", not "Requested". The validation formula on the Status column is: =AND(Status="Migrate",[DB Mods Required]<>"") ([DB Mods] is a Yes/No column). This indicates to me that the Status column is not getting the correct default value from my NewItem form.

If I use the default NewItem form, I see that the proper default value (Requested) is set, and I can save the item without the validation triggering.

4
  • Did you customize your form in InfoWise or Designer?
    – Erin L
    Commented Aug 22, 2016 at 20:28
  • if you are showing status field in new form it's working properly ? if yes try to hide this field with Jquery / javascript ? also should you share your validation ? Commented Aug 22, 2016 at 20:32
  • @ErinL - I used SharePoint Designer
    – FreeMan
    Commented Aug 23, 2016 at 11:54
  • @M.Qassas - I've added the validation formula to the question
    – FreeMan
    Commented Aug 23, 2016 at 11:57

1 Answer 1

2

Yes/No fields need to be treated as boolean. So you need to use a choice field if you want to require a choice.

With DB Mods Required as a radio button with Yes/No as options, try this validation formula: =IF(AND([Status]="Migrate",ISBLANK([DB Mods Required]),false,true). This says that if Status is Migrate, but DB Mod Required has not been filled out, validation fails.

8
  • Since [DB Mods Required] is not a required field and doesn't have a default value, the intent of my validation is to ensure that it gets filled in when Status = Migrate. If Status <> Migrate then that field has no meaning. How would I check for that?
    – FreeMan
    Commented Aug 23, 2016 at 14:13
  • Setting a yes/no field to required doesn't do anything. It's FALSE if it's not checked, so that is its default value. I get around this by creating a choice field with radio buttons, no default value, and making it required. Then checking for not blank will work.
    – Erin L
    Commented Aug 23, 2016 at 14:17
  • If I set it to required, I won't have to check for "not blank" because SharePoint will do that automatically, correct?
    – FreeMan
    Commented Aug 23, 2016 at 14:27
  • That's correct.
    – Erin L
    Commented Aug 23, 2016 at 14:28
  • 1
    With DB Mods Required as a radio button with Yes/No as options, try this validation formula: =IF(AND([Status]="Migrate",ISBLANK([DB Mods Required]),false,true). This says that if Status is Migrate, but DB Mod Required has not been filled out, validation fails.
    – Erin L
    Commented Aug 23, 2016 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.