Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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

  • v-jefferni Profile Picture
    on at
    Re: Conditions and Parent.Default on Combobox

    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.

  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at
    Re: Conditions and Parent.Default on Combobox

    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard