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 / Defining collection co...
Power Apps
Answered

Defining collection column types - error and best practices?

(0) ShareShare
ReportReport
Posted on by 62

Scenario - 

 

I am creating a collection from a filtered SQL table and then adding 3 columns to it. I then am creating a second collection off of the first collection but with no data in it, to track changes. My issue is even though the column in question in the first collection has both numbers and text in it (is a nvarchar() type in SQL) and therefore must be a string/text type column in this first collection. The same column in the second collection is being created or set as an integer type column.  See screenshot below...

 

2023-12-14_07-30-06.png

 

 

 

 

 

Note I have also wrapped all of the ParamValue: inputs in my patch statements with the Text() function, so even when the incoming value is a number it should be saved as a string.

 

So, my question is two parts really - 1) how to fix the above issue and 2) what other best practices are out there for defining collection column types. 

Categories:
  • Ed_Bellman Profile Picture
    62 on at

    I have also tried -

    1. Creating my second collection directly from the SQL table using FirstN(x,0), adding the same 3 columns back into the collection = same error
    2. Creating my second collection directly from the SQL table using an existing "placeholder" record that has a text value in the ParamValue column, adding the same 3 columns to the collection = same error!

    2023-12-14_08-24-44.png

    And just to confirm, here is what the 12 value in the second row above looks like. 

    2023-12-14_08-42-01.png

     

     

     

     

    ¯\_(ツ)_/¯

     

    So apparently my collection is okay but somewhere along the line it is trying to be converted to a number and failing, but again, all of my patch statements for this column are wrapped in Text() so I'm seriously scratching my head at the moment.

  • Verified answer
    Ed_Bellman Profile Picture
    62 on at

    What a joke and PITA Power Apps is sometimes...!

    Even though my Text Input field was set format of Text, and was obviously outputting a data type of Text...

    2023-12-14_09-25-44.png

     

     

     

     

     

     

     

    The solution was to wrap the textinput.text output in the Text() function. Say what?!?!

    2023-12-14_09-21-30.png

     

    I had wrapped all other instances where an ID was getting saved into this ParamValue field in Text() functions but never thought I would need to convert text to text.

     

    I thought about deleting this thread since it really wasn't a collection issue but I'm going to leave it here in case others have a similar stupid issue.

     

    So frustrating Microsoft!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard