Initial Value based on Form

Hello Appsheet Community!

I have the following question:

I have one table "Aufträge" and created 2 slices for 2 different forms and views ( "Vorbereitet" and "Erfasst" ( these are the names of the Views and Forms)).

So now, i want to set an initial value for the column "Status"  based on the form i choose. 

For better understanding:

If i open the form "Vorbereitet" the column Status should be set to "Vorbereitet" and if i open the Form "Erfasst" the column Status should be set to "Erfasst".

It would be very great to get some help for finding a solution.

Many thanks in advance and nice greets from Austria

Solved Solved
0 2 90
1 ACCEPTED SOLUTION

Please use CONTEXT("View") function based expression in the initial value

IFS(CONTEXT("View")=""Vorbereitet"", "Vorbereitet",
CONTEXT("View")="Erfasst", "Erfasst"
)

 

relevant help article: CONTEXT() - AppSheet Help

Please ensure you name the form view names properly by confirming view names that reflect in the app editor as shown below

Suvrutt_Gurjar_0-1673536571724.png

 

 

View solution in original post

2 REPLIES 2

Please use CONTEXT("View") function based expression in the initial value

IFS(CONTEXT("View")=""Vorbereitet"", "Vorbereitet",
CONTEXT("View")="Erfasst", "Erfasst"
)

 

relevant help article: CONTEXT() - AppSheet Help

Please ensure you name the form view names properly by confirming view names that reflect in the app editor as shown below

Suvrutt_Gurjar_0-1673536571724.png

 

 

Thanks a lot, it work!

IFS(CONTEXT("View")="Vorbereitet_Form", "Vorbereitet",
CONTEXT("View")="Erfasst_Form", "Erfasst"
)

 

Many thanks for your support!

Top Labels in this Space