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 / Can I set the data-set...
Power Apps
Unanswered

Can I set the data-set property cds-data-set-options through a parameter?

(1) ShareShare
ReportReport
Posted on by 32

Hello,

We currently have a PCF with the following in the Control Manifest file:

 

<data-set name="dataset" display-name-key="dataset" cds-data-set-options="displayCommandBar:false;displayViewSelector:true;displayQuickFind:true"></data-set>

 

 

We'd like to have the ability to configure 'displayCommandBar' as we need an additional PCF that is almost identical but we will not display the command bar. Is it possible to set the value through a parameter, or is this impossible?

 

i.e. Is something like this possible?

 

<data-set name="dataset" display-name-key="dataset" cds-data-set-options="displayCommandBar:{property.displayCommandBarParam};displayViewSelector:true;displayQuickFind:true">
</data-set>

<property name="displayCommandBarParam" display-name-key="displayCommandBarParam" description-key="If set to true display command bar, otherwise do not." of-type="TwoOptions" usage="input" required="false" default-value="false" />

 

 

We are assuming the alternative is to create another PCF with one of the only differences being displayCommandBar is set to true. Unfortunately this will result in a lot of code duplication, unless we create some common code directories. This seems a bit clunky.

 

Thanks in advance

 

I have the same question (0)
  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Hello,

    I'm afraid this Control Manifest parametrization is not something you could achieve.

  • akatakkar Profile Picture
    32 on at

    Ok - thanks for confirming that. 

     

    I cannot think of any other way to do this, other than duplicating almost identical component code. From what I gather, it would be very tricky to create a common library that is shared between 2 components because of the generated code. 

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 600

#2
WarrenBelz Profile Picture

WarrenBelz 478 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard