cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
Community Champion
Community Champion

How to build a variable gallery?

I'm creating a debugging menu for my app and want to create a Gallery to view and toggle variable statuses.

 

Is there a way to create a variable from the text entered in a Text box? Using @CarlosFigueira's method of sharing an app to convey the idea! 🙂

 

Please see attached.

 

Thanks

2 REPLIES 2
mr-dang
Community Champion
Community Champion

Hi @ericonline, I like the way you think with having a debugging panel.

You can create a gallery with toggles, but referencing the specific toggle will be a lengthy lookup:

LookUp(Gallery1.AllItems,var="var_name",Toggle1.Value)

 

This means, "Look up the value of the toggle in Gallery1 where the var column matches the name of your "variable". Alternatively, you could lookup the value in the collection, but you get the same result.

 

It may be easier to place the toggles individually in a container like a canvas:

https://www.youtube.com/watch?v=8f4vxZ_B7Qk

 

You can show and hide the canvas with one click of an icon for debugging purposes.

 

When you reference the state of this variable, you can reference the value of the toggle itself.

Toggle1.Value

I'm not able to import your app 😞

 

 

Microsoft Employee
@8bitclassroom

I'll look through the resources you provide and see if I can make it work. Still unsure whether I can store a variable in a Gallery then toggle it using the Lookup function. Can't wait to play with that one. 

 

RE: Importing the app: Its not really an import, but rather an extract and open. 

  • Unzip it
  • Open PowerApps web studio
  • Under "Open" there is a "Browse" option to browse your local filesystem
  • Open the unzipped .msapp file
  • (Should work) 🙂

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,447)