Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

How can I do this?

I tried using the IFS([Report Reason]=“Chem Treatment”,“PASS") with the initial value. It does not change dynamically.

The Selection for “Chem Treatment” is ENUM with 2 options to chose from. “Test” “Chem Treatment”. ONce “Chem Treatment” is chosen, I want to Report Reason to say “PASS”. If input is “Test”, it should say “Fail” and grey out.
Please let me know how to model “Report Reason” and “Well Status”
What Type should be “Report Reason”?
What Type should be “Well Status”?
What expression should I use for “Well Status” and “Report Reason”?

Solved Solved
0 14 727
1 ACCEPTED SOLUTION

Thank you
That works great. Appreciate it

View solution in original post

14 REPLIES 14

Have you tried to insert the formula at App formula section?
IF([Report Reason]=“Chem Treatment”, “PASS”, “Fail”)

The column type of report reason should be Text
Is “Well Status” a column? what do you want it to do?

Well Status is Enum with dropdown options of "Pass or Fail.
Report reason is Enum with “Chem treatment and Press test” as dropdown

Ok, I was wrong in my previous reply.

The column type for [Well Status] should be text.
The column type for [Report Reason] can be Enum with 2 selections: 1) Chem Treatment; 2) Press Test.

You can insert this formula into App Formula of [Well Status].
IF([Report Reason]=“Chem Treatment”, “Pass”, “Fail”)

Let me know if this works.

I shall try and let you know
Thank you for the advice

Hi Jin
That did not work

Are [Report Reason] and [Well Status] created under the same table?

I tried to look at your app and it looks like the table which contains [Well Status] column is a child table of the table which has [Report Reason].

They are in the same table

[Chem Treatment] column type is ENUM, base shall be Text. Your ENUM options are OK: “Test” and “Chem Treatment”

For [Report Reason] column, the column type shall be Text and you can use below AppFormula and Editable? properties:


[APPFORMULA]

IF(
	[Chem Treatment]="Text","FAIL","PASS"
)

[EDITABLE?] Click on the blue funnel on right, click on the field, type the formula, validate and save

OR(
	ISBLANK([Chem Treatment]),
	NOT([Chem Treatment]="Text")
)

I can’t say anything for that [Well Status] column, because you had mentioned nothing about it.

Here is some more information.

[Report REASONS] is a column type Enum with “Pressure Test” and “Chem Treatment” as dropdown

[SWD_Status] is column and is now a TEXT
In App formula: IF([Report Reason]=“Chem Treatment”, “Pass”, “FAIL”)
Editable? OR(
ISBLANK([Report Reason]),
NOT([Report Reason]="")
)

It is putting [SWD_Status] FAIL in every instance where some one creates a new record of a event.
Also, have a orange on info
“Column Name ‘SWD_Status’ in Schema ‘Database_Schema’ cannot use an EditableIf constraint if it has an App Formula. The EditableIf constraint will be ignored”

Please help.

@ABBA
Firstly, when there’s an AppFormula, the columns value is not editable, so there is no meaning of using an expression in the Editable_if property of such a column.

Secondly; the expression in your Editable_if property always returns a TRUE value. Actually;
NOT([Report Reason]="") is congruent with ISNOTBLANK([Report Reason])
Therefore, though you were not using an AppFormula, the column value will always be editable.

Thanks Mr LeventK
So how do we achieve getting default of “Pass” or “Fail” or “”(empty) as [SWD_Status] based on [Report Reason]
Condition: IF([Report Reason]=“Chem Treatment”, “Pass”
IF([Report Reason]=“Pressure Test”, “Fail”
IF([Report Reason]=“”, “”
Thanks,
Appreciate the help

Try with this, provided you only have 2 options for [Report Reason] column:

SWITCH(
    [Report Reason],
    "Chem Treatment", "Pass",
    "Pressure Test", "Fail",
    CONCATENATE("")
)

Thank you
That works great. Appreciate it

You’re welcome. Can you please mark my post as the solution? That may be beneficial for other community users as well if they search within the solution tag. Thnx.

Top Labels in this Space