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

Re: Help needed with advanced function!

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 II
Dual Super User II

Re: Help needed with advanced function!

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

Re: Help needed with advanced function!

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (3,660)