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 / Default values for "in...
Power Apps
Answered

Default values for "input" properties

(0) ShareShare
ReportReport
Posted on by 103

Hi,

 

  is there a way to pass default values to the control properties? Those that have usage set to "input" ?

 

Thanks,

Alex

I have the same question (0)
  • MagnusGöransson Profile Picture
    424 on at

    Yes, there is usually a "Default" property on each control. Depeinging on the type you can set it to a date, a true/false value or text.

     

    Set it to something static or use a variable.

  • ashlega Profile Picture
    103 on at

    Hi Magnus,

     

      I am looking for a way to add default property value to the control manifest in PCF. Something like this:

     

    <property name="test" display-name-key="test" description-key="test" of-type="SingleLine.Text" usage="input" required="false" default="default value" />

     

      The above line does not work, though, since "default" attribute is not recognized.

     

     

  • Verified answer
    Ben Thompson Profile Picture
    1,400 on at

    Personally I would just add the default values to the parameters at the top of the index.ts class and then override them with the parameter value at the top of the updateView method.

     

    private template: string="Default Value";
    
    public async updateView(context: ComponentFramework.Context<IInputs>): Promise<any>
    	{		
    		this.contextObj = context;
    		if (context.parameters.Template){		
    			this.template=context.parameters.Template;
    		}		
    
    
     

     

  • ashlega Profile Picture
    103 on at
    Hi Ben,

    That would work, but I was hoping to actually to be able to show those default values in the form designer(can probably add them to the description, too, when they are not too long... but would be nice if the users could see those default values, not just assume them from the "documentation")
  • Hemant Gaur Profile Picture
    Microsoft Employee on at

    @ashlega wrote:
    Hi Ben,

    That would work, but I was hoping to actually to be able to show those default values in the form designer(can probably add them to the description, too, when they are not too long... but would be nice if the users could see those default values, not just assume them from the "documentation")

    This is great suggestion @ashlega , can you please log a feature request idea here ?

     

    hemant 

  • ashlega Profile Picture
    103 on at

    Hi Hemant,

     

      there you go: https://powerusers.microsoft.com/t5/PowerApps-Ideas/Support-default-parameters-for-PCF-control-properties/idi-p/304376#M26681

     

      It seems Ben's suggestion would be the answer for now.

     

    Thanks,

    Alex

  • Verified answer
    Guido Preite Profile Picture
    1,488 Super User 2024 Season 1 on at

    Hi Alex, there is already a property to define a default value, it is default-value

    my control already uses it (source) and the form designer show the values (however they are not rendered in the harness)

     

    in my blog post there is a screenshot of the properties

  • ashlega Profile Picture
    103 on at

    Thanks, Guido! I think that's exactly what I was looking for.

     

     

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#2
Haque Profile Picture

Haque 69

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard