Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
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

 

  • akatakkar Profile Picture
    32 on at
    Re: Can I set the data-set property cds-data-set-options through a parameter?

    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. 

  • a33ik Profile Picture
    3,304 Most Valuable Professional on at
    Re: Can I set the data-set property cds-data-set-options through a parameter?

    Hello,

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

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 55 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 42 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 31 Super User 2025 Season 1

Overall leaderboard