Guys, I have an application where I need to filter in a form active regions that are active on SharePoint. In the main table, which I'll call Table1, I have the records generated from this form, and in another table, I search for active regions, which I'll call Table 2.
Now that it's working, I can filter active regions, but I've discovered a bug when there are regions with the same name. So, I want to add a rule when filtering by taking another auxiliary column called 'Diretoria.' How can I do that?"
Here is the code I am using today:
Filter(
Choices([@Table1].Regional),
LookUp(Table2 As p, p.Regional = Value).Ativo = true
)
@v-mengmli-msft Both columns "Regional" and "Diretoria" are the type of Lookup and get values from Table 2
Hi @mrPax ,
What is the type of Regional of Table1?
Please try add ".Value" after the "Regional".
Best regards,
Rimmon
Hi @mrPax ,
Have you tried "AddColumns"? Maybe this is what you want.
AddColumns(Filter(
Choices([@Table1].Regional),
LookUp(Table2 As p, p.Regional = Value).Ativo = true
),"Diretoria",LookUp(Table1,Regional=Value,Diretoria))
Best regards,
Rimmon
Hi @v-mengmli-msft,
In Table 1 we have columns called "Regional" and "Diretoria" both columns are used in Table 2 too
The diference is, in table 1 go the results when i create a new record in app, and the other table stays with the same value.
In table two we can Activate the column "Regional" and i'm filtering this here to only show values "Ativo" =true in combobox:
Choices([@Table1].Regional),
LookUp(Table2 As p, p.Regional = Value).Ativo = true
)
To make this "Regional" column value different to another, we had this column called "Diretoria" where we have "South, West, North" so i want to increment this column in code too.
There is a way to do this?
Thanks!
Hi @mrPax ,
What does your Table1 look like? What does your Table2 look like?
It will be better to show some examples of tables and results to explain what you want.
Best regards,
Rimmon