cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Help needed with advanced function!

Hello,

 

I am currently working on an app Where I display three values in a drop down list: Expectation Not Met, Expectation Met, Expectation exceeded. I need to be able to display the text but be able to add the values 1,3,5 to the text so I can average out the scores. 

 

Does anyone know a method to be able to assign a number value to text or how to properly find averages from a dropdown?

 

Anything will help. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @Anonymous 

 

You can test with @Pstork1 's method, and there is another choice is you can use Table function.

 

Example:

Dropdown.Items=Table({Name:"Expectation Not Met",score:1}, { Name:"Expectation Met", score:3},{Name:"Expectation exceeded",score:5})

(Then  you can use the DataTable or other controls can check your formula expression)

Table.PNG

 

More information:

function-table

 

Hope this could be helpful.

 

Best Regards.

Yumia

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User III
Dual Super User III

Build your dropdown values as a collection using the following:

 

ClearCollect(dropdownvalues,{Name:"Expectation Not Met",score:1},{ Name:"Expectation Met", score:3},{Name:"Expectation exceeded",score:5})

 

Bind the dropdown to that collection and set the Value property to Name.  Now you can access the value associated with the name using dropdown1.selected.score



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Community Support
Community Support

Hi @Anonymous 

 

You can test with @Pstork1 's method, and there is another choice is you can use Table function.

 

Example:

Dropdown.Items=Table({Name:"Expectation Not Met",score:1}, { Name:"Expectation Met", score:3},{Name:"Expectation exceeded",score:5})

(Then  you can use the DataTable or other controls can check your formula expression)

Table.PNG

 

More information:

function-table

 

Hope this could be helpful.

 

Best Regards.

Yumia

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,481)