web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Conditional default va...
Power Apps
Unanswered

Conditional default value (datacardvalue)

(0) ShareShare
ReportReport
Posted on by 4

Hello,

We have a checklist form with many data entry fields, most of which are selected from a drop-down list. My aim is to set certain DataCardValue fields to a default value based on the condition selected in DataCardValue06.

For example, if DataCardValue06 is selected as X, then DataCardValue07-08-09 should automatically be set to "N/A". What formula should I use to achieve this condition?

Categories:
I have the same question (0)
  • SimnaJ Profile Picture
    205 on at

    To set certain DataCardValue fields to a default value based on the selection made in another field, you can use the "Switch" function in Power Apps. Here is an example formula that you can use:

     

    Switch(DataCardValue06.Selected.Value, "X", UpdateContext({varDefault: "N/A"}));

     

    In this formula, we are using the Switch function to check the value of DataCardValue06. If the selected value is "X", we are using the UpdateContext function to set the varDefault variable to "N/A". You can replace the "varDefault" with the name of the DataCardValue fields that you want to set to "N/A".

    After setting the variable, you can use it to set the default value for the DataCardValue fields that you want to update. Here's an example formula for DataCardValue07:

    If(IsBlank(DataCardValue07.Selected.Value), varDefault, DataCardValue07.Selected.Value)

     

    This formula checks if a value has already been selected for DataCardValue07. If it's blank, it uses the varDefault variable as the default value. If a value has already been selected, it uses that value.

    You can use similar formulas to set default values for DataCardValue08 and DataCardValue09. Make sure to update the names of the fields and variables as needed.

     

    If my answer was helpful in solving your issue, please consider marking it as the solution by clicking the 'Mark as solution'.

     

  • ozgurpehlevan Profile Picture
    4 on at

    Thank you for your help. But to be honest, I didn't understand anything. 😞 What formula should I write in which field for Datacardvalue6? And for the other Datacards that I want to get the default value depending on the DatacardValue6 value, which formula should I write in which field?

  • ozgurpehlevan Profile Picture
    4 on at

    I think I'm making a mistake somewhere. As I mentioned, I want to conditionally bind two fields to each other on the form entry. If the value of datacardvalu6 is selected as X from the dropdown list, I want the value of datacardvalue7 or  datacardvalue8 to be N/A without selecting any value from the dropdown list. I would appreciate it if you could help me with this.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard