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 / Problem wih a Required...
Power Apps
Answered

Problem wih a Required property when certain Users are using the app

(0) ShareShare
ReportReport
Posted on by 878

So for my Sharepoint list form there is one field that I want to always be required if you select one option from a certain combobox. I've been achieving this with: 

If(
 DataCardValue1.Selected.Value = "Diferencia en precios";
 true;
 false
)

However, now I need that if the subordinates of one person is using the app, even if they select this Value, this field must NOT be required. I know I can get the subordinates creating a collection and with the use of the DirectReports+Office365Users comands, like so:

ClearCollect(InsideSales;UsuariosdeOffice365.DirectReports("bigBoss@company.com"))

However I'm having trouble combining all of this into that required property. With ChatGPT i got this formula:

If(
 DataCardValue1.Selected.Value = "Diferencia en precios" || 
 IsEmpty(Lookup(colTeam; Mail = Lower(User().Email)));
 false;
 true
)

No luck with this. I tried changing it a bit with the use of a formula I used before in another scenario that checked if the current user was amongst the ones of a collection, and combined it like this:

If(
 DataCardValue1.Selected.Value = "Diferencia en precios";
 CountIf(InsideSales; Trim(Lower(Mail)) = Lower(Trim(User().Email))) > 0
 false;
 true
)

No luck either... So, do you know how I can acheive this behaviour?

Thanks in advance for the input :)!

Categories:
I have the same question (0)
  • Verified answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @WorkingRicardo 

     

    can u try this please:

    If(
     DataCardValue1.Selected.Value = "Diferencia en precios" && Not(CountIf(InsideSales, Mail = Lower(User().Email)) > 0),
     true, // The field is required
     false // The field is not required
    )
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • WorkingRicardo Profile Picture
    878 on at

    @mmbr1606 omg that was so fast haha! Thank you so much, that did the trick.

  • WorkingRicardo Profile Picture
    878 on at

    Hey again @mmbr1606  nooo I just noticed that this creates another issue now 😞 Since for those people that create the new item in that condition is not required, they won't input anything. But for those who receive the item and want to edit it, it WILL be required for them, even though this field should remain blank.

    I've tried adding to your formula that it only applies when it is a new form (FormName.Mode = FormMode.New), but this makes it for some reason that NEVER is required.

    I tried fiddling other things in that formula, but that made it that for the rest of the people that are not in the collection, it is not required for them as well.

    To recap:

    1- If the people in the collection choose "Diferencia de precios" and are creating the item, it should not be required

    2- People outside the collection pick "diferencia de precios", always required, regardles if they are creating or editing the item

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard