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 / Conditions and Parent....
Power Apps
Answered

Conditions and Parent.Default on Combobox

(0) ShareShare
ReportReport
Posted on by 170

Hi guys,

 

I have customized powerapps form on sharepoint and would like to change my Combobox DefaultSelectedItems.

Parent.Default dont work with Conditions.

 

If(SharePointForm1.Mode=New;
If(DataCardValue6.Selected.Title="Test");
Filter(["1";"2"];Value="1");Filter(["1";"2"];Value="2");

Filter(["1";"2"];Value=Parent.Default))

 

Please help to correct code

Categories:
I have the same question (0)
  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @shnurich 

     

    Please try this

     

    If(
     SharePointForm1.Mode = FormMode.Edit,Parent.Default,
     If(
     DataCardValue6.Selected.Title = "Test",
     {Value: "1"},
     {Value: "2"}
     )
    )

     

     
    Thanks,
    Stalin - Learn To Illuminate

  • v-jefferni Profile Picture
    on at

    Hi @shnurich ,

     

    I assume you will need Parent.Default in View Mode & Edit Mode of the form, otherwise "1" or "2" base on the DataCardValue6.Selected.Title, so:

    If(SharePointForm1.Mode = FormMode.New;
     If(DataCardValue6.Selected.Title="Test";
     {Value:"1"};
     {Value:"2"}
     );
     Parent.Default
    )

     

    A little modification to @StalinPonnusamy 's codes:

    If(
     SharePointForm1.Mode = FormMode.Edit || SharePointForm1.Mode = FormMode.View,
     Parent.Default,
     If(
     DataCardValue6.Selected.Title = "Test",
     {Value: "1"},
     {Value: "2"}
     )
    )

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

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