List from a selected enumlist values

ATR
Participant III

I’m trying to get a list based on selected ref enumlist. I’ve tried this formula but it didn’t return anythig.

SELECT(
Requisições[Proposta],
IN(Requisições[Requisição], [_THISROW].[Requisições]),
TRUE
)

I want to get the values from “Proposta” column at “Requisições” table that matches with the selected “Requisições” enumlist ref from “Requisições” table. The form is at another table called “Cobrança” that has “Requisições” Column (that is a Enumlist with ref to Requisições table) and it has a “Proposta” column that should return what i said before

Solved Solved
0 9 1,801
1 ACCEPTED SOLUTION

MultiTech
Participant V

@Marc_Dillon Wouldn’t a list-dereference work better here? It would certainly be more efficient.


Your original formula:

SELECT(
Requisições[Proposta],
IN(Requisições[Requisição], [_THISROW].[Requisições]),
TRUE
)

could be simplified to

UNIQUE([Requisições][Proposta])

View solution in original post

9 REPLIES 9

Remove this part:
3X_d_3_d38a552f79d0db5d2c9201db7ac4f4afa82ab304.png

ATR
Participant III

It worked, thanks. I thought i had to specify the table to look this column

ATR
Participant III

I found a problem with my enumlist. When i created it was showing a yellow alert, i was able to “fix” it by setting a formula at valid_if. But the existing values were still with the yellow alert, they just disappeared when i selected the current value again at the enumlist options. But when i selected it the “Proposta” value disappeared too.

This image i reselected an existing value and the “Proposta” column disappeared on my form

3X_2_9_29758f985d9b26fc2af44c536055341fbe01d443.png

And at this image i didn’t updated the existing value, so it was showing the yellow alert but it also shows the “Proposta” column as expected

3X_f_6_f69a1749c99801fdb8547ea45e2a95793c48e887.png

Srry for my bad English, it’s not my first language

I’m not really following which Table you are in with those screenshots. What is the App Formula for the [Propostas] column?

Yellow triangle means the column is supposed to be a Ref to another table, but the selected value does not exist as a Key value for any record in the referenced Table.
https://community.appsheet.com/search?q=yellow%20triangle

If you are specifying a Valid_If expression for Enum/EnumList with base type of Ref. you NEED to do so with SELECT( table[key-column]...), which is also equivalent to simply FILTER(table...)

Also understand how Keys and Labels work together.

ATR
Participant III

Actually i’ll describe the process of creation from my app because i think i planned it bad. With a Spreadsheet already created and with values, i started creating tables that tracks payments, but we track payments by a number that is on the order table (that i didn’t set at the beginning). Would it be better to fix the reference between order table and the payments table ("Requisições and “Notas”)? Srry about the confusion this is my first app, i’ve read a lot and watched the 101 course but as English is not my first languague maybe i let some information pass when i was studying.

I’m sorry, you haven’t provided near enough information for me to give any sort of sensible response. Screenshots of your table and column definitions would be much more effective…

ATR
Participant III

I have three tables, the first one is the order table:

The other is the payment document table:

The last one is the payment dues control:

The payments due control table is a child from Payment Document table, but what i’m trying to do is when adding a new row at payments document table (“NotasData”) when i select a “Requisição” value (that are values from the order table (“Requisição” table) it will auto compute the “Proposta” value

MultiTech
Participant V

@Marc_Dillon Wouldn’t a list-dereference work better here? It would certainly be more efficient.


Your original formula:

SELECT(
Requisições[Proposta],
IN(Requisições[Requisição], [_THISROW].[Requisições]),
TRUE
)

could be simplified to

UNIQUE([Requisições][Proposta])

Yeah, i did it, now i think everything it’s okay. But i made this UNIQUE([Requisições][Proposta]) as an app formula and at my card view this values disappeared, is it normal? Should i change to a initial value formula?

This the card view that is not showing the Proposta (i made it show as long piece of text)
3X_5_8_586253bfa3eca87d4d4b2a790bd2cfffb1f52cd8.png

But at my form it appears
3X_5_b_5b79881948ef85b46c518f4a1d594d866d358b93.png

Top Labels in this Space