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

How to use a ComboBox lookup using a label value to find column in a Sharepoint List

Hi,

I want to insert a formula into a label that when a Building name is selected from a dropdown, the formula will look up the building from a Sharepoint list and return the value in a column determined by another separate label.

 

Below is my Sharepoint List Data.

 

Building Name

2017

2018

2019

Building 1

100

400

700

Building 2

200

500

800

Building 3

300

600

900

 

I have set up the dropdown to show the options Building 1, 2 and 3, and the below formula works fine

 

ComboBox1.Selected.'2018'

 

However, I want to change “’2018’” to the value in Label 1, which for now say is 2019. I have tried the below formula, however this causes an error.

 

ComboBox1.Selected.'Label1'

 

Please can someone advise me what to change my formula to instead of “’Label1’”.

 

Example below

 

Data

Drop down value = Building 2

Label = 2019

 

Answer

Label with Formula = 800

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: How to use a ComboBox lookup using a label value to find column in a Sharepoint List

Hey @SG1990 

 

Reference of column name is not possible using a label directly, in such a case, you can use:

Switch(Label1.Text, "2018", ComboBox1.Selected.'2018', "2019", ComboBox1.Selected.'2019', "2020", ComboBox1.Selected.'2020')

 

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!

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: How to use a ComboBox lookup using a label value to find column in a Sharepoint List

Hey @SG1990 

 

Reference of column name is not possible using a label directly, in such a case, you can use:

Switch(Label1.Text, "2018", ComboBox1.Selected.'2018', "2019", ComboBox1.Selected.'2019', "2020", ComboBox1.Selected.'2020')

 

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!

View solution in original post

SG1990
Level: Powered On

Re: How to use a ComboBox lookup using a label value to find column in a Sharepoint List

Thanks for your comment.

 

Unfortunately this just causes an error for me. Additionally I was hoping someone might have a different solution to this as in my example I have only 3 columns, however what I am working on has over 100 columns and using that formula would be very long winded for 100+ columns.

 

Thanks again for your help though. 

SG1990
Level: Powered On

Re: How to use a ComboBox lookup using a label value to find column in a Sharepoint List

@yashag2255 , apologies but the formula did work, I must have made a mistake first time. Even though this is more long winded than I hoped, this method does work. Thanks. 

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,100)