How to make last entry is selected?

expressions
(Kevin Chan) #1

Hello,

I have a dynamic dropdown from column STUDENT[School] and I would like to know if it is possible for me to make the dropdown select the last entry/selection from the RSVP[School]?

Why I need the dropdown to select the last entry? If the dropdown selects the last entry for me from the RSVP[School], this will save me a step by selecting the same school again and again for the next 50 rows of entries.

(Steve Coile) #2

Use the Initial value expression to pre-select whichever choice you want.

(Kevin Chan) #3

How to use Initial Value to pre-select the school? I have 17 schools name and I don’t know which one I should pre-select until I started to input the data? Please advise. Thank you.

(Steve Coile) #4

Construct an expression that will return the school identified by the last new entry.

Typically, the last new entry will be the last row of the worksheet. AppSheet provides the _ROWNUMBER column containing the row’s row number in the worksheet. Therefore, the newest row is the one with a _ROWNUMBER value equal to MAX(RSVP[_ROWNUMBER]).

Knowing the row number of the newest row, you can use LOOKUP() to get the value of any column from that row: LOOKUP(MAX(RSVP[_ROWNUMBER]), "RSVP", "_ROWNUMBER", "School").

(Kevin Chan) #5

@Steve

I need more guidance because I couldn’t make it work. Where should I input these expressions?

The column [School] is a type Text and has Valid-IF statement STUDENT[School].

Please advise. Thank you.

(Steve Coile) #6

Try setting Initial value to the expression I provided.

1 Like
(Kevin Chan) #7

@Steve

Thank you very much once again. It works beautifully.

1 Like