cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Zimos
Level: Powered On

Adding a row to a single-value table in a context variable

Hello everyone,

 

I'm trying to do something that feels like it ought to be very simple but I can't figure it out and I haven't found a solution by searching. I'm creating a context variable that contains a single-value table returned from the ForAll function that is referencing a person column in a sharepoint list. I'm then using this table in a Filter function for a gallery elsewhere in my app. What I want to do next is add an additional record to my context variable that holds a blank value. Any help would be greatly appreciated. I'm guessing this is very simple, but the way that PowerApps logic works still feels very backwards and unintuitive to me. Thanks!

 

UpdateContext(
    {
        assigned_filter: ForAll(help_desk_admins, admin_user.Email)
    }
);
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Adding a row to a single-value table in a context variable

Hi @Zimos 

 

You can try using a collection instead of a context variable, please follow the below expression:
 
ClearCollect(assigned_filter,{Value:""});Collect(assigned_filter,ForAll(help_desk_admins, admin_user.Email))
 
Now, you can reference this collection to filter out the results in your gallery.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

1 REPLY 1
Highlighted
Super User
Super User

Re: Adding a row to a single-value table in a context variable

Hi @Zimos 

 

You can try using a collection instead of a context variable, please follow the below expression:
 
ClearCollect(assigned_filter,{Value:""});Collect(assigned_filter,ForAll(help_desk_admins, admin_user.Email))
 
Now, you can reference this collection to filter out the results in your gallery.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 266 members 3,774 guests
Please welcome our newest community members: