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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / The Value cannot canno...
Power Apps
Answered

The Value cannot cannot be converted to a number

(0) ShareShare
ReportReport
Posted on by 214

I'm running into an issue when I am editing a record from the gallery.  To give a bit of background, is that the customer record pulls the "Area" from a table within SQL where each Area is represented by a number (i.e. United States = 3, Canada = 1, United Kingdom = 10)

 

AreaIDArea
1Canada
3United States
10United Kingdom

 

LyonsBI_BRL_0-1679379392490.png

 

Under Update under the card, I have CountryAreaField.Text which is where it is throwing the error at

 

Under Default I have the following code below

 

LookUp(collectCountryListView,DefaultCountry = DropdownDefaultCountry.SelectedText.Value,Area)/*LookUp('[dbo].[vw_CountryList]',DefaultCountry = DropdownDefaultCountry.SelectedText.Value,Area)*/

 

 

I've tried changing it to Value(CountryAreaField.Text) though that doesn't seem to do anything. Any helpful suggestions would be greatly appreciated. 

 

Thanks

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @LyonsBI_BRL ,

     

    Look like a mismatch of columns.

     

    Can you try:

     

    LookUp(collectCountryListView,DefaultCountry = DropdownDefaultCountry.Selected.AreaID,Area)

     

    If this doesn't work, can you share what the Items property of the DorpdownDefaultCountry looks like? For this to work, the user needs to select a text, but the dropdown should return the AreaID when referenced.

  • LyonsBI_BRL Profile Picture
    214 on at

    @BCBuizer Just tried that and this time I get a warning on the DataCard. This change was made in the Default part of the card. Also my mistake it's NOT a dropdown it's a card. As it's referencing another card dropdown menu called DropdownDefaultCountry. The Items field calls the collection of collectCountryListView

    LyonsBI_BRL_0-1679392534131.png

     

  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @LyonsBI_BRL ,

     

    I noticed there's a typo in your formula: SelectedText, where it should say Selected .

     

    Can you please share what the Items property of DropdownDefaultCountry looks like and also which columns you have in collectCountryListView to get an idea of how the data is structured?

  • Verified answer
    LyonsBI_BRL Profile Picture
    214 on at

    @BCBuizer figured it out. Within the Update field for the Area label, the Update field should have been coded as below

    LookUp(collectCountryListView,DefaultCountry = DropdownDefaultCountry.SelectedText.Value,AreaID)
    
    

    By doing so this recorded the ID of the Area within the table

    LyonsBI_BRL_2-1679562762566.png

    and the red X has now gone away

     

    LyonsBI_BRL_3-1679562800036.png

     

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard