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 / Data Properties Variable
Power Apps
Unanswered

Data Properties Variable

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I'm trying to put a condition to the edit page of my form where in if two or more items (using checkbox) has been selected, the DefaultSelectedItem should be Empty, and if only a single item is chosen, it would populate the edit page with the items current attiributes.

 

However this code i'm using does not seem to work.

 

Snippet:

 

If(
CountRows(selected) > 1,UpdateContext({defaultsuggested:""}),

UpdateContext({defaultsuggested:"Parent.Default"})

)

 

I tried removing the quote on the Parent.Default but it still does not work.

 

img.PNGdefaultfield.PNG

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey,

     

    where do you have your code snippet?

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @Anonymous 

     

    Parent.Default is not a tring variable and it only works in the context of an element having a parent

     

    What you could do is this

    If(
    CountRows(selected) > 1,UpdateContext({defaultsuggested:""}),

    UpdateContext({defaultsuggested:"parent"})

    )

     

     

    and then in default selected items property 

    use If(defaultsuggested = "parent",Parent.Default,defaultsuggested)

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @RezaDorrani ,

     

    I did what you suggested, but unfortunately I got an error on the data proerties of the field.

     

     

    Error on data properties.PNG

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @Anonymous 

     

    For testing, add a label and specify its text property as defaultsuggested 

    Juts to check what value is present in defaultsuggested 

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @RezaDorrani 

     

    As expected, It shows the "parent" when only a single checkbox is checked, but applies "" when multiple items are selected.

     

    parent.PNG

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard