App expression for [survey_status] not working as expected

Evening all,

I have an app expression in [survey_status] to force an “Abort” status in certain “No” states.

The Expression Assistant tests as OK but only the “Abort” part of it works in the form.

And, in an “Else” state all of the status buttons are missing in the form.

Any pointers please?

IF(
OR(
[Enough_Space_For_Cabinet]=“No”,
[Enough_Space_For_HPR]=“No”,
[DB_Q1]=“No”,
[FOSE_Q1]=“No”,
[LPR_Q1]=“No”,
[Jum_Con_Q1]=“No”,
[Enough_Space_For_Cable]=“No”
),
“Aborted”,
SPLIT(
LIST(“Completed”, “In Progress”, “On Hold”, “Aborted”),
“,”
)
)

Solved Solved
0 8 191
1 ACCEPTED SOLUTION

Set Editable? to:

NOT(
  AND(
    OR(
      [DB_Q1] = “No”,
      [Enough_Space_For_Cabinet] = “No”,
      [Enough_Space_For_Cable] = “No”,
      [Enough_Space_For_HPR] = “No”,
      [FOSE_Q1] = “No”,
      [LPR_Q1] = “No”,
      [Jum_Con_Q1] = “No”
    ),
    [Survey Status?] = "Aborted"
  )
)

View solution in original post

8 REPLIES 8

@Jake_Naude
Below expression should suffice

IF(
	OR(
		[Enough_Space_For_Cabinet]="No",
		[Enough_Space_For_HPR]="No",
		[DB_Q1]="No",
		[FOSE_Q1]="No",
		[LPR_Q1]="No",
		[Jum_Con_Q1]="No",
		[Enough_Space_For_Cable]="No"
	),
	{"Aborted"},
	{"Completed", "In Progress", "On Hold", "Aborted"}
)

Thanks @LeventK,

I’ve popped that in and the buttons are back… but they’re all selected…

3X_1_4_1481c637e3d517fc642a2a12adadf7fb8fb0c33c.png

Please advise if it possible to for the surveyor to select any of the 4 statuses - as long as the “No” condition is not triggered?

Valid If

LIST(
  "Completed",
  "In Progress",
  "On Hold",
  "Aborted"
)

Initial value

IFS(
  OR(
    NOT([DB_Q1]),
    NOT([Enough_Space_For_Cabinet]),
    NOT([Enough_Space_For_Cable]),
    NOT([Enough_Space_For_HPR]),
    NOT([FOSE_Q1]),
    NOT([LPR_Q1]),
    NOT([Jum_Con_Q1])
  ),
    "Aborted"
)

Hi @Steve,

Thanks for that… I’m getting an error I don’t understand…?

Whoops! I’d assumed the columns were Yes/No values, but it appears not. Replace NOT(...) with ("No" = ...).

Thanks @Steve,

Sorry I wasn’t clear earlier… The columns below are all Enum with “Yes” & “No” values.

I’ve got your expression in the Initial Value and the “Aborted” button is now auto-selecting when a no condition is presented - thanks!

I appreciate that an Initial Value is editable by the surveyor and that this behaviour is as intended for the Initial Value property.

Here’s the big ask…

Is it possible to take this scenario a step further and prevent a surveyor changing that status whilst the “No” condition exists?

IFS(
OR(
[DB_Q1] = “No”,
[Enough_Space_For_Cabinet] = “No”,
[Enough_Space_For_Cable] = “No”,
[Enough_Space_For_HPR] = “No”,
[FOSE_Q1] = “No”,
[LPR_Q1] = “No”,
[Jum_Con_Q1] = “No”
),
“Aborted”
)

3X_2_7_27426877488c5261452a22711317ad475ccf856f.png

Set Editable? to:

NOT(
  AND(
    OR(
      [DB_Q1] = “No”,
      [Enough_Space_For_Cabinet] = “No”,
      [Enough_Space_For_Cable] = “No”,
      [Enough_Space_For_HPR] = “No”,
      [FOSE_Q1] = “No”,
      [LPR_Q1] = “No”,
      [Jum_Con_Q1] = “No”
    ),
    [Survey Status?] = "Aborted"
  )
)

Hey @Steve,

Perfect…!!! That’s the ticket…!!!

Many thanks…

Top Labels in this Space