Announcements
HI
I have a datasource defined by formula:
Switch(varGrupo;"Projeto"; ProjProjeto; "Plan"; PlanProjetos)
I want to define Item as galleryProjects.Selected but that is a error.
Is taht possible to set datasource this way? I
@alessandramaced
You cannot dynamically change schemas of variables in PowerApps. That would be more of a development type thing.
Instead consider setting two galleries, one with ProjProjeto and one with PlanProjects. Then set the Visible of the two galleries as varGrupo="Projecto" for the ProjProjeto one and varGrupo="Plan" for the plan one.
I hope this is helpful for you.
Hi @alessandramaced ,
Assuming the field names and types are exactly the same on both lists, you may be able to do something like this
Switch( varGrupo; "Projeto"; LookUp( ProjProjeto; ID=GalleryName.Selected.ID ); "Plan"; LookUp( PlanProjetos; ID=GalleryName.Selected.ID ) )
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 342 Super User 2026 Season 2
M Bilal Khan 271
Mohsin Ali 223