Hi,
I am trying to create a collection by combining the word "All" and the values of a Choice. The list of values in the collection should be "All", "New", "In Progress", "Solved", "Closed". I have been able to add the values of the Choice as shown underneath.
ClearCollect(TicketFilter, Choices(JobStatus).Value);
I have tried amending the code to add "All" at the start but this causes an error.
ClearCollect(TicketFilter,{Value :"All"});
Collect(TicketFilter, Choices(JobStatus).Value);
I've tried numerous edits to the code but have not been able to get this to work. Can anyone offer any assistance? Any help would be much appreciated.
Solved! Go to Solution.
Hi @s_galligan
It works well with Sharepoint but not Dataverse. As a workaround, we can loop through the list
ClearCollect(
TicketFilter,
{Value: "All"}
);
ForAll(
Choices(JobStatus).Value,
Collect(
TicketFilter,
{Value: Text(ThisRecord.Value)}
)
)
Thanks,
Stalin - Learn To Illuminate
Hi @s_galligan
ClearCollect(TicketFilter, {Value: "All"}, Choices(SPList.ColumnName))
Example
ClearCollect(TicketFilter, {Value: "All"}, Choices(IssueTracker.Status))
Thanks,
Stalin - Learn To Illuminate
Thanks for replying @StalinPonnusamy. Unfortunately that hasn't worked so let me provide some additional clarification. The Choice I have is called "JobStatus" and it was created within Powerapps as shown in the images below. I am trying to combine these values with "All" to form a collection.
Hi @s_galligan
It works well with Sharepoint but not Dataverse. As a workaround, we can loop through the list
ClearCollect(
TicketFilter,
{Value: "All"}
);
ForAll(
Choices(JobStatus).Value,
Collect(
TicketFilter,
{Value: Text(ThisRecord.Value)}
)
)
Thanks,
Stalin - Learn To Illuminate
Thank you @StalinPonnusamy, that worked perfectly. I had spent the last 2 days trying to figure this out so I'm extremely grateful for your help.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
196 | |
71 | |
49 | |
36 | |
25 |
User | Count |
---|---|
242 | |
111 | |
89 | |
88 | |
66 |