
Hello:
I have created a sharepoint list called Agents. One column (HorariAgent) is based on other list "Horaris Agents", column "Horari".
I have created a powerapp to manage the Agents list.
In one form the column "HorariAgent" is represented by choice.
I need to filter this choice list. if the Horari value exists more than two times in Horari column of Agents table, item can't be showed in choice list . How can I get this?
Thanks in advance.
Francesc
Hi @francescjp
This one is a bit headache inducing - add the below into the Items property:
With(
{
_choices_above_2: Distinct(
Filter(
DropColumns(
AddColumns(
GroupBy(
AddColumns(
Agents,
"_choiceValue",
HorariAgent.Value
),
"_choiceValue",
"grouped_items"
),
"count_selected",
CountRows(grouped_items)
),
"grouped_items"
),
count_selected > 2
),
_choiceValue
)
},
Filter(
Choices([@'Horaris Agents'].'HorariAgent'),
Not(Value in _choices_above_2.Value)
)
)
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.
Imran-Ami Khan