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 :)!