Hi everyone,
I need help with a complex if statement. I am creating a guided upload application for users to upload their documents to SharePoint and add specialised metadata.
For each different document type there are different metadata requirements. I need the "Submit" button to be disabled if not all the fields have been completed or a document attached.
The IF statment logic is escaping me, this is what I have come up with so far but it has not worked;
If(Field1="DocumentType1" && IsBlank(Field1A) || IsBlank(Field1B) || IsBlank(Field1C), Disabled, Edit),
If(Field1="DocumentType2" && IsBlank(Field2A) || IsBlank(Field2B), Disabled, Edit),
If(Field1="DocumentType3" && IsBlank(Field3A) || IsBlank(Field3B) || IsBlank(Field3C) || IsBlank(Field3D), Disabled, Edit)
Any help will be greatly appreciated!
Solved! Go to Solution.
Try this...
If(Field1="DocumentType1" && (IsBlank(Field1A) || IsBlank(Field1B) || IsBlank(Field1C)), Disabled,
If(Field1="DocumentType2" && (IsBlank(Field2A) || IsBlank(Field2B)), Disabled,
If(Field1="DocumentType3" && (IsBlank(Field3A) || IsBlank(Field3B) || IsBlank(Field3C) || IsBlank(Field3D)), Disabled, Edit)))
Try this...
If(Field1="DocumentType1" && (IsBlank(Field1A) || IsBlank(Field1B) || IsBlank(Field1C)), Disabled,
If(Field1="DocumentType2" && (IsBlank(Field2A) || IsBlank(Field2B)), Disabled,
If(Field1="DocumentType3" && (IsBlank(Field3A) || IsBlank(Field3B) || IsBlank(Field3C) || IsBlank(Field3D)), Disabled, Edit)))
No luck on that, for some reason it will always use the Else value even if the first If statement resolves to true.
Ok I got it working now the issue was the ambiguity with the ORs so I just made AND scenarions with the True value being DisplayMode.Edit and Else being DisplayMode.Disabled 🙂
Ok I got it working now the issue was the ambiguity with the ORs so I just made AND scenarions with the True value being DisplayMode.Edit and Else being DisplayMode.Disabled 🙂
User | Count |
---|---|
123 | |
90 | |
88 | |
75 | |
66 |
User | Count |
---|---|
219 | |
179 | |
138 | |
95 | |
72 |