web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Writing the 'real' val...
Power Apps
Unanswered

Writing the 'real' value of a comboxbox item to the datasource

(0) ShareShare
ReportReport
Posted on by 634

Ok. I really have no idea how to word this which is probably why I can't find an answer when searching. Here is what I want to do. I have a combobox driven by a datasource. In this case it is Dataverse. The values show in the combobox are from column 1. This is a human readable value. What I want to write to the datasource and use in a label is the 'real' value which is in column 2. For example.

 

Source Name     Source Value

email                         1

banner                       2

etc...

 

Then my label might be something like source=1 for an email source.

 

This seems like it should be possible right?

Categories:
I have the same question (0)
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Future_Vision Could you please tell the data type for these 2 columns in DataVerse.

  • Future_Vision Profile Picture
    634 on at

    Right now I only have the first column which is a text column. The second column is text in some cases and in others it is numeric

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Future_Vision to understand better, would you mind sending me a screenshot of your Dataverse Table Schema (column names, type etc) and also your App. Thanks 

  • Future_Vision Profile Picture
    634 on at

    @CNT 

    I can't send either since this is an in-house app. The best I can do is share what I am attempting to do. 

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Future_Vision since you are using Dataverse, the best way to do Lookups is using Choice (with that you don't have to worry how the value is stored behind the scene as Dataverse will take care of it). Create a Choice column

    CNT_0-1621543525282.png

    Click Choice and then select New Choice, give it a name and Add your options such as email, banner etc...

    In the Items property of u'r Combobox give the following formula,

    Choices(yourChoiceColumnName)

     

    Hope this helps!

  • Future_Vision Profile Picture
    634 on at

    @CNT 
    I don't think this achieves what I am looking for. What I would want to see in the combobox is a value such as "email" but the corresponding value in the table would be '1'. Maybe I am needing to do a lookup to find that alternate value?

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Future_Vision Why would you want to store a value manually and worry about getting the right value, patching the right value etc., when Dataverse will do it for you automatically?

    If you still want to do it, you can have a table with 2 columns Source Name  &   Source Value and use that table as the datasource for your dropdown and based on the user selection, you will patch the SourceValue to your table.

  • Future_Vision Profile Picture
    634 on at

    @CNT 

    The interface that people will be interacting with needs to be human-readable. The output does not. In fact it is often better that the output is obfucated to some degree. That is why I was looking for using human-readable values in the app but a numeric value in other cases. Make sense?

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Future_Vision that's exactly what choices does out of the box. It gives you a human readable text while hiding the code behind it and the complexity of storing, retrieving etc. No harm in giving it a try though! 

  • Future_Vision Profile Picture
    634 on at

    Are you saying that the Choices is going to give me 0,1,2,3.... a value or at least an option for output? I think I recall seeing that option although for another type of data. I still have an issue with Choices only being readable. At least it is in Teams.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 248 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 209 Super User 2026 Season 1

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 195

Last 30 days Overall leaderboard