Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Completion status with nested if statements?

Avatar

Avatar
Validate 1
Level 1
hy9fesh
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
hy9fesh
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
hy9fesh
Level 1

24-05-2015

I need something similar to the following script that is not working:

In theory, I would put the script in the "calculate" event of a text field called "Completion Status."

if(Subform.TextField1.rawValue !== null && Subform.TextField2.rawValue !== null && Subform.TextField3.rawValue !== null &&

Subform.TextField4.rawValue !== null &&

((TableSubform.Table.Row1.TextField5.rawValue == null && (TableSubform.Table.Row1.TextField6.rawValue == null && (TableSubform.Table.Row1.TextField7.rawValue == null) ||

((TableSubform.Table.Row1.TextField5.rawValue !== null && (TableSubform.Table.Row1.TextField6.rawValue ==  "Yes" && (TableSubform.Table.Row1.TextField7.rawValue == null) ||

((TableSubform.Table.Row1.TextField5.rawValue !== null && (TableSubform.Table.Row1.TextField6.rawValue ==  "No" && (TableSubform.Table.Row1.TextField7.rawValue !== null)) &&

((TableSubform.Table.Row2.TextField5.rawValue == null && (TableSubform.Table.Row2.TextField6.rawValue == null && (TableSubform.Table.Row2.TextField7.rawValue == null) ||

((TableSubform.Table.Row2.TextField5.rawValue !== null && (TableSubform.Table.Row2.TextField6.rawValue ==  "Yes" && (TableSubform.Table.Row2.TextField7.rawValue == null) ||

((TableSubform.Table.Row2.TextField5.rawValue !== null && (TableSubform.Table.Row2.TextField6.rawValue ==  "No" && (TableSubform.Table.Row2.TextField7.rawValue !== null))

)

{

this.rawValue="Complete";

} else {

this.rawValue="Not complete"

Basically, I have a form with four fields on top that need to be completed. Then, I have a three column table (first row being the header) with two rows of fillable text fields with the following rules in order for the form to be deemed complete:

If TextField5 is blank, then TextField6 and Textfield7 do not need to be filled in

If TextField5 is not blank, then TextField6 needs to be filled in with "Yes" or "No"

If TextField6 is "Yes," then TextField7 does not need to be filled in

If Textfield6 is "No," then TextField7 does need to be filled in

Please let me know where my script went wrong! Thanks!

Accepted Solutions (0)

Answers (0)