Search code examples
powerapps

Convert an object to string in PowerApps


For debugging purposes I would like to display the value of different objects. Is there any way you can convert an object to a string to display all of its properties and values?


Solution

  • Not in a generic way. If you have an object that is set to a variable, like below:

    Set(obj, { Name: "John Doe", Age: 33 })
    

    Then you can use the & operator or the Concatenate function to create a string from that object:

    Concatenate(
        obj.Name,
        " - ",
        obj.Age
    )
    

    You can also see the value of the variables in the View -> Variables menu on the ribbon.

    If you believe that this is a feature that should be supported, consider creating a new item in the PowerApps Ideas board.