cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ACPBSCi
Resolver I
Resolver I

Use multiple columns from a reference list

I have a parent list and two reference lists as data sources for my app. The parent list holds the data that was inputted by the user via the app. The app uses one reference list for the ratings (Ratings List) and one reference list for the criteria (Criteria List). My Criteria List has 2 columns, one for the criteria and one for the weighted value:

 

TitleWeighted Value

Supply Impact

6
Quality Compliance4
Strategic Value10

 

My Ratings List also has 2 columns, one for the rating and one for the value of the rating:

 

TitleValue

High

5
Medium3
Low0

 

A user rates each Criteria as High, Medium or Low and the app multiplies the weighted value of the Criteria by the value of the Rating. I figured out how to do that. I utilized combo boxes in my app for the ratings. When I connected my Ratings List as a data source, I pulled the Value column in. How do I also pull in the Title column so I can set a variable with the Rating and not the Rating Value? Or how do I reference the Title column when I go to set a variable?

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @ACPBSCi ,

 

Could you please share more details about your scenario? 

 

Assuming you have a combo box with Items set to the list "Ratings" rather than the Choices column in the parent list, and primary text set to "Value":

236.png

 

Then if you would like to set a variable when changing the rating, you could set OnChange of the Combo box to:

Set(varRating1, Self.Selected.Title);Set(varRating2, Self.Selected.Value);

So you have created 2 variables when change selections within the Combo box, one is the selected rating Title, the other is the selected rating Value.

 

When you set the Items property of a combo box to a LookUp column, that is Choices(ParantList.Rating) in this case, to get the Title of Rating list is not as simple as above. You will need to look up to the ratings list:

Set(varRating3, LookUp(Ratings,Value = Self.Selected.Value, Title))

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

2 REPLIES 2
v-jefferni
Community Support
Community Support

Hi @ACPBSCi ,

 

Could you please share more details about your scenario? 

 

Assuming you have a combo box with Items set to the list "Ratings" rather than the Choices column in the parent list, and primary text set to "Value":

236.png

 

Then if you would like to set a variable when changing the rating, you could set OnChange of the Combo box to:

Set(varRating1, Self.Selected.Title);Set(varRating2, Self.Selected.Value);

So you have created 2 variables when change selections within the Combo box, one is the selected rating Title, the other is the selected rating Value.

 

When you set the Items property of a combo box to a LookUp column, that is Choices(ParantList.Rating) in this case, to get the Title of Rating list is not as simple as above. You will need to look up to the ratings list:

Set(varRating3, LookUp(Ratings,Value = Self.Selected.Value, Title))

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

ACPBSCi
Resolver I
Resolver I

THAT'S IT!!!

Set(varRating1, Self.Selected.Title)

I knew there had to be a way!! Thank you so much, @v-jefferni, this is exactly the solution I need! You're my hero!

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,122)