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 / Canvas App dataset PCF...
Power Apps
Unanswered

Canvas App dataset PCF - all data types are SingleLine.Text

(0) ShareShare
ReportReport
Posted on by 4,702 Moderator

I am building a pcf dataset control specifically targeting canvas app deployment. The control needs to be flexible to lots of different views, so it needs to be able to handle any data types being thrown at it. The issue is that when I actually go to test this in a canvas app, every single column comes through as SingleLine.Text, regardless of what was actually inserted:

cchannon_0-1597261374599.png

Take a look at the debugger screenshot above. We have a few random columns; some are optionsets (statuscode) others are DateOnly (pcx_due) but everyone of them shows up as SingleLine.Text, both in the context.parameters.dataset.columns object and in the dataset.records[x] object.

OK, so you might think I am crazy here. Maybe I just didn't pay attention to my deployment and grabbed bad data - not so:

cchannon_1-1597261643825.png

The Canvas App itself recognizes the data types we're looking at, and lists them as DateTime and "Complex" but for some reason when the data hits the PCF, everything is a String.
OK, so at this point I thought, "maybe this is a manifest thing. I am not specifying the columns in the dataset there to keep it open for whatever view comes in, but maybe I actually need to, so I added a row for pcx_due: 

 

<data-set name="dataSet" display-name-key="Dataset_Display_Key">
 <property-set name="pcx_due" display-name-key="Due Date" description-key="Due Date" of-type="DateAndTime.DateOnly" required="true"/>
 </data-set>

 

But this had zero impact whatsoever; the datatypes are unchanged and as far as I can tell, adding this to the manifest resulted in no change to the pcf execution context whatsoever.
In most cases, I don't really care. Optionsets, for example I only want to work with labels anyway so the String representation is fine by me. but the Date one is really a headache. Because I am only getting the integer representation of the date and the object is called a String regardless of its reality, it isn't really possible for me to tell the difference between a date and an integer, so I don't know how to render the value in UI.
I assume I just skipped something in the manifest or canvas app setup, but I just don't see it. Can someone point to what I missed here?

I have the same question (0)
  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @cchannon 

    I have the same issue. I work with optionsets, and all my columns have the datatype SingleLine.Text.

    In the dataset I can see that the data is correct (for instance orb_optionsetcode in the screen below):

    image.png

    But both getValue and getFormattedValue are returning the string

    image.png

    So I suppose I'll wait until the dataset is becomming more stable in CanvasApps.

     

    Besides that,  I don't know how to define the property-sets for my dataset in the CanvasApp designer. I don't mean the definition of columns, but how to specify which one is the property-set defined in my manifest. Have you succeeded to define that?

     

    Kind regards,

    Diana

  • cchannon Profile Picture
    4,702 Moderator on at

    Well, I'm glad I'm not alone on this one at least 🙂

     

    @HemantG - is your team aware of this universal setting of all data types as String from canvas app? Should we report a 🐛?

     

    @DianaBirkelbach No, I haven't gotten the property-set in the manifest to do anything useful so far. In the Sandbox, it forces me to try to translate columns in my csv to the defined property-set which is the behavior I would expect (some kind of forced mapping in the Canvas App setup UI) but when I actually deploy it to Canvas App it is the "Add Fields" that wins every time, without any regard to what I put in property-set... but to be honest, even though it isn't what I would have expected, that is the behavior I want: if I have to define it in advance in the Property-Set, then I have to lock into a specific set of columns; number of col and type of col. That would rob the PCF of a lot of flexibility, so honestly I am much happier with the Add Fields in canvas app winning out here.

     

     

  • cchannon Profile Picture
    4,702 Moderator on at

    Here, just one more screenshot that shows the weirdness: We can see here that the data is coming through the way it should, but because the Types are all wrong, this can cause us real problems when trying to render the data. For now, I guess I will just implement an ugly work-around like treating Integers greater than 1M as DateTime and less than 1M as Integers, but for obvious reasons that is not a production-quality solution.

     

    cchannon_0-1597319287533.png

     

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    @cchannon ,

     

    I think in CanvasApps, "Add fields" is the way you define the "view", but each "property-set" defined in the manifest is exposed as a dedicated property for the PCF in CanvasApps. 

    The property-set are added as columns to the dataset (on top of the added view-columns) but for now they are all empty in CanvasApps, since I don't know how to bind them.

     

    I understand, the property-set is not the solution for everything; but it's usefull when you want to let the user to choose fields for a specific functionality implemented.

     

    I'm looking forward until datasets will get production-ready in CanvasApps.

     

    Kind regards,

    Diana

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,055

#2
Valantis Profile Picture

Valantis 666

#2
11manish Profile Picture

11manish 666

Last 30 days Overall leaderboard