cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RoScha
Helper V
Helper V

Search for a column in a collection using a variable lable from a data record in a gallery

Hello community,

Today I have a really crazy question and I have no idea whether it is even possible.

 

I have a collection with the column names "Col1", "Col2", "Col3" and "Col4".
Now I have a gallery. The gallery is filled via a SharePoint list and in this SharePoint list there is the column name for each data record. So "Col2" could be in one data set, "Col4" in another, and "Col1" in a third data set.

 

I now display this data field from SharePoint in the gallery and now I had this crazy idea:

does it work that I flexibly fetch the value for the column name from the gallery, then a function is provided, e.g. remembers "Col2", then goes into the collection, and shows me the value from "Col2" from the collection in the gallery record?

 

Can you even understand what I mean here, because unfortunately English is not my mother tongue and I work with the Google translator here.

 

Best regards

RoScha

1 ACCEPTED SOLUTION

Accepted Solutions

@RoScha ,

Just a Switch() statement with whatever you are doing

Switch(
   YourVariable,
   "Column1",
   Column1,
   "Column2",
   Column2
   . . . . 
)

 

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.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User III
Super User III

Hi @RoScha ,

You cannot dynamically refer to control or field names in Power Apps - is this what you mean?

You could "hard code" it.

 

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.

RoScha
Helper V
Helper V

@WarrenBelz 

It's a shame ... but what should such a "hard code" look like in my example?

@RoScha ,

Just a Switch() statement with whatever you are doing

Switch(
   YourVariable,
   "Column1",
   Column1,
   "Column2",
   Column2
   . . . . 
)

 

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.

View solution in original post

WarrenBelz
Super User III
Super User III

Hi @RoScha ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (58,376)