cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ali80
Frequent Visitor

Getting an Object must implement IConvertible error

Hi All,

I have an form that, amongst other things, shows a dropdown list of Regions and Countries. Details of this form include:

  • The countries displayed depend on the region selected (i.e. if the Americas is chosen, then it will show countries like Brazil, USA etc. and not Japan for example).
  • The Regions and countries list are stored in a collection generated in `OnStart`.  
  • The data is saved to a SP List that has these fields set up as `Single Line text`.
  • The data is saved using the `Update` property of the controls. 

 

When i try to submit my form I get an IConvertible error. Not sure what that is but I suspect that one of my dropdowns is causing this (the Regions one is my guess).  Screenshots below:

 

The error message:

qownnotes-media-aqHDvP.png

 

Code that might help :

 

How Items property of Region dropdown is displayed:

qownnotes-media-VmjdBN.png

 

Update property of Region dd:

qownnotes-media-ZSUtPg.png

 

Items property of Country dropdown:

 

qownnotes-media-RazzSc.png

Update property of Country dd:

qownnotes-media-BvEKhQ.png

 

I have no clue how to decipher this error or convert this appropriately. As always, any help is appreciated!. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ali80
Frequent Visitor

So I eventually gave in and re-did the entire process of adding a dropdown from scratch - and lo and behold it now works!

I have no clue why however, I did exactly what I did before - but I can't complain, it works is what matters.  For those wondering what process I followed I found a video that basically recreates the same steps I use for creating a cascading dropdown (SubmitForm ver.) : https://www.youtube.com/watch?v=Qzpjq008cBY

 

 

View solution in original post

7 REPLIES 7
timl
Super User
Super User

@ali80 

If I had to take a guess, I'd say that this is the culprit.

 

timl_0-1651869946279.png

 

I'd try changing that like so to see if it makes a difference:

usr_Region_dd.Selected.Name
ali80
Frequent Visitor

Hi @timl 

Thanks for replying! I tried changing it to .Name but still getting an error. 

ali80_0-1651915687067.png

The only option I see after adding a dot on the word selected is `Result` which (I assume) has to do with the fact that I alphabetically sorted the region list. The results of the sort is stored in one column called `Results` - Im just not sure how to write back the results into the SP List. 

timl
Super User
Super User

@ali80 

If you set it to this, do you still get the same error?

usr_Region_dd.Selected.Result

 

ali80
Frequent Visitor

@timl  - No not the same error. If I change it to ...Selected.Result I get an `Expected Record value.` error.

ali80_0-1651919861158.png

 

timl
Super User
Super User

"Expected record value" sounds as though Power Apps thinks that the region field is a lookup. Can you confirm that Region is definitely a 'single line of text' field?

ali80
Frequent Visitor

Hi timl 

In Sharepoint? it's definitely set as a `Single line` field. right now Im trying to find a way to take the Result table's ... result... and shove it into a variable or something that I can then use to save back into the SP list.  

ali80
Frequent Visitor

So I eventually gave in and re-did the entire process of adding a dropdown from scratch - and lo and behold it now works!

I have no clue why however, I did exactly what I did before - but I can't complain, it works is what matters.  For those wondering what process I followed I found a video that basically recreates the same steps I use for creating a cascading dropdown (SubmitForm ver.) : https://www.youtube.com/watch?v=Qzpjq008cBY

 

 

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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,218)