Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Error : Object must implement IConvertible

Posted on by

Hi team, i am working on a power apps and need your help in a specific scenario. 

Data source : SP List

Overview of app : App is used by HR professionals to feed the input and as per requirement. Power automate is used in backend to send emails. In SP List, have used People or Group type column to capture the email addresses.

 Requirement : When user edit the request and update the content than ‘On Submit’ it throws an error ‘Object must implement IConvertible’

 

AJ_vizMan_0-1644325426659.png

 

This is first time I have seen this error. And this error appear in ‘edit’ mode not in ‘Play’ mode.

Appreciate your help.

 

@RandyHayes @AJ_Z 

  • RandyHayes Profile Picture
    RandyHayes 76,308 on at
    Re: Error : Object must implement IConvertible

    @AJ_vizMan 

    Happy to help and glad it is working and you learned some new things!

  • AJ_vizMan Profile Picture
    AJ_vizMan on at
    Re: Error : Object must implement IConvertible

    HI @RandyHayes - First of all thank you so much for helping out many of us in the community. Your response is so fast and helpful. Thank you so much for who you are and what you do.

    On 'Error : Object must implement IConvertible' issue - i had tough time. Although i used 'Monitor' to check where exactly the issue is but, i was unable to find it. Hence, i created a new screen altogether and now app is running perfect.

     

    Later i learned how to properly use 'Monitor' to find out error message.

    With challenges we have good learnings!! Thank you.

     

  • RandyHayes Profile Picture
    RandyHayes 76,308 on at
    Re: Error : Object must implement IConvertible

    @AJ_vizMan 

    Get rid of the variables and put your formulas directly in the Update properties for the fields you are trying to update.

     

    However, you might be going down the wrong road.  Your issue is with the SubmitForm action and there is something in one of the columns that is being submitted that is causing the problem.  However, it might not be the fields that you think!  

    I would utilize the Monitor Tool to first see what is being submitted.  This will give you the best clue as to which column is at fault.

     

    Otherwise, please provide the Update properties for the columns that you currently are using variables in.

  • AJ_vizMan Profile Picture
    AJ_vizMan on at
    Re: Error : Object must implement IConvertible

    Thank you @JR-BejeweledOne  for pointing the possible issue.

     

    I have checked the column types used in SP list. Using squared columns in below screenshot as custom data card to accept values stored in variables.

     

    AJ_vizMan_5-1644492737444.png

     

    Column - RepeatedSection – Concatenate(NewItemsString1,NewItemsString)

    Column RepeatedSectionOnly -  NewItemsString

     

    In PowerApps, I removed the column which contain variables and still error is there.

    Sometimes error disappear but, while editing a request ‘On Select’ of submit button it throws same error.

    Should I change the way to assign variables to data card? Can you suggest any possible alternative please.

     

    Tagging - @RandyHayes @AJ_Z - appreciate your response

  • JR-BejeweledOne Profile Picture
    JR-BejeweledOne 5,825 on at
    Re: Error : Object must implement IConvertible

    Have you customized any of the data cards to contain variable values or anything like that?   If so, that could be your problem, you might have a mismatch between what you are putting in the datacardvalue and the column type.

  • AJ_vizMan Profile Picture
    AJ_vizMan on at
    Re: Error : Object must implement IConvertible

    Thank you @JR-BejeweledOne for suggesting good way to check the error part.

     

    I followed the same : And Error appears on 'SubmitForm()' 

     

    AJ_vizMan_0-1644386936644.png

     I checked all the fields in the form and couldn't see any potential issue. Is this something data type issue or something else??

  • JR-BejeweledOne Profile Picture
    JR-BejeweledOne 5,825 on at
    Re: Error : Object must implement IConvertible

    You want to start by isolating where the error is coming from.  So for testing purposes, I would put 4 buttons on the screen.

     

    For the OnSelect of each button, break down your submit formula.   On the first 3 buttons add one of your UpdateContext formulas and on the last button put your submit.   What this will accomplish is to allow you to test each specific command separately in prod.   This will allow you to isolate which portion of the OnSubmit is causing the issue.

     

    We can go from there.

  • AJ_vizMan Profile Picture
    AJ_vizMan on at
    Re: Error : Object must implement IConvertible

    Sure @JR-BejeweledOne , thanks for response.

    Here is the formula on 'On Select' property of Submit button -->

     

    UpdateContext(
    {
    NewItemsString: Concat(
    galRepeattingTableNewScreen_3.AllItems,
    Concatenate( lblItemSerialNumber.Text,
    ";",
    //drpActionItemNewScreen.Selected.'Action Item'
    drpActionItemNewScreen_3.Selected.'Action Item',
    ";",
    txtOtherActionItemNewScreen_3.Text,
    ";",
    txtDescriptionNewScreen_3.Text,
    ";",
    drpStatusNewScreen_3.Selected.Result,
    ";",
    txtNotesActionTakenNewScreen_3.Text,
    ";",
    txtClosureOwnerNameNewScreen_3.Text,
    ";",
    dteClosureDateNewScreen_3.SelectedDate,
    ";",
    drpSentimentEditScreen.Selected.Result,
    ";|;" ))});

     

    UpdateContext(
    { NewItemsString1 :
    Concatenate(
    "0",
    ";",
    //DataCardValue75_1.Selected.Value,
    DataCardValue48_3.Selected.'Action Item',
    ";",
    DataCardValue76_4.Text,
    ";",
    DataCardValue77_4.Text,
    ";",
    StatusValue_4.Selected.Result,
    ";",
    DataCardValue83_4.Text,
    ";",
    DataCardValue51_3.SelectedDate,
    "|" )});

    UpdateContext(
    {
    StatusCombined: Concat(
    galRepeattingTableNewScreen.AllItems,
    Concatenate(
    drpStatusNewScreen_3.Selected.Result,
    ";" ))});


    //If(DataCardValue85_1.SelectedDate > Today(), Set(varMessage:"Error",Set(varMessage:"Valid Date"));
    UpdateContext({EmailActionPerformed :If(DataCardValue9.Selected.Email <> Blank(),EmailActionPerformed + 1,EmailActionPerformed) });
    SubmitForm(frmNewFeedback_3);

    Navigate('Feedback Submitted Success Screen')

     

    Above is the formula used.

  • JR-BejeweledOne Profile Picture
    JR-BejeweledOne 5,825 on at
    Re: Error : Object must implement IConvertible

    Can you share your submit formula?

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard