Hey Community, I used VarFromData in Item at Form Control and get data from gallery data successfully. But I do not understand why does this work, i stole the idea from some videos. I use gallerydata.selected to get selected data, but it has error. I have seen any source to explain VarFromData. It shows green color in the property, is there any document to explain the meaning of different colors of the function in PowerApps? Thanks experts in advance!!!
Power Apps will color controls, variables, and other defined terms to help with debugging and visualizing relationships.
Your VarFromData term is likely a variable defined by a Set() or UpdateContext() function. In the Studio, click on View and then Variables to see a list of them used/defined in your app. Click on the one labeled VarFromData and you'll where it shows up in your app.
Thanks sir, I just checked variables and i saw it there. Can we understand it as a reference? But I still confuse when shall i need to use it and what the purpose to use it? Sorry, i am a newbie in Powerapps!
BTW, is there any documents to explain all the color controls - from general sense, I think it will be very help to know the meaning of different colors when I use it more often. Sometimes, I just solved a single problem - but it is willing to deep understand this powerful tool!! Thanks again!
Here's some info on the syntax colors in Power Apps. It is a handy feature that many code development studio apps use.
A variable is a reference to some data that you can use in your app. You can store and then later retrieve or alter the data to suit the app's purposes. Power Apps uses two main kinds of variables: Global variables that can be used across any screen, and context variables that only exist on the screen on which they are created.
Note, one of the strengths of Power Apps is that you don't have to use a lot of variables; much of the data can be accessed by referring to controls and their properties. For example, Label1.Text will bring along whatever string is stored in Label1's Text property. Another one, Gallery1.Selected, will give access to the currently-selected record from Gallery1. This helps make using controls and data a lot more intuitive.
Your explanation is very clear! PowerApps has made some function for us to retrieve data, but sometimes it does not work. I am not sure they, for instance, Gallerydata.Selected does not work in my scenario ( I assume it is bc my gallerydata item has search and filter, so selected cannot recognize it). Variables seems more powerful to refer to whatever we want to use again. I will do more research on that 2 types of variables - it is useful! In PowerBi, it uses reference query to intro this kind of technique. I do see people use variables in PQ, but i have not used it. It is interesting to different terms they introduce in different tools. Thanks for your patience and great answer!!!
Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.
Your chance to join an engaging competition of Power Platform enthusiasts.
The Super User program for 2022 - Season 2 has kicked off!
Attend in person or online, there are incredible conferences and events happening all throughout the month of September.