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 198
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