cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
3csman
Impactful Individual
Impactful Individual

Creating Multiple Conditional Variables

I have a Member list. The members are allowed access, view, edit and other rights to the database based on their 'hierarchy' designation in the Member list "HierarchyColumn'. A Member can be either 'National', 'Region', 'Local' or 'Employee'.

 

My original configuration looks like the below. I can do this with the National and Region because of the limited number of names. However, the bulk of the Members (more than 500) have a hierarchy of 'Local' or 'Employee' on the Member list

 

How can I create a variable that when applied to any dropdown, comb box, or Gallery will consider the Member hierarchy, and if 'National' - provided Full Access, if 'Region' - Show 'only' all items associated with the Region they are assigned to as indicated on the Member list 'RegionColumn' in the Member list, If 'Local' - Show 'only' all items associated with the Location they are assigned to as indicated in the Member list 'LocationColumn', and if the hierarchy is  'Employee' - Show 'only' items associated with that employee (using the UnqIDColumn).

 

I'm currently using the following to separate for 'National' and 'Region'. Can I create one that considers the below and incorporated the above?

 

 

'Set(varIsNational,If(User().FullName="Joe Schmoe",true,User().FullName="Jane Doe", true,User().FullName="Moon Mullins",true,false));

 

Set(varIsRegion,If(User().FullName="Jack Sprat",true,User().FullName="Johnny Rotten", true,User().FullName="Hubba Bubba",true,false));

3 REPLIES 3
VijayTailor
Resident Rockstar
Resident Rockstar

Hi @3csman ,

You can use the gallery to DIsplay all the Records.

In Items Properties you can use the Condition Based on User Privilege

If(IsBlank(varIsNational)ListName);
if(IsBlank(varIsRegional),Filter(ListName,ColumnName=varIsRegional.ReigionName);
//Same goes Like that

.
Like - above

3csman
Impactful Individual
Impactful Individual

I believe I understand.

It looks like one condition per incident, yes?

 

Is there a way to may a multiple statement Condition, that I can apply to any Gallery, Dropdown, Comb Box with such a need?

I am pulling the employee UserName/Email from the active directory, and storing it in a Member list.

 

Can there be one condition with multiple statements that can read the UserName pulled (as displayed on screen in the User interface), compare it to the UserNames on the Member list and the 'HierarchyColumn' and automatically allow or forbid National, Region, Local, Employee access? 

 

If not, will this do the same thing...

 

If(IsBlank(varIsNational)ListName);

If(IsBlank(varIsRegion),Filter(ListName,Region,=varIsRegion.RegionName);
1. and another one for Local

2. and another one for Employee

 

...and place them all together in the items property of whatever Gallery, Dropdown or Comb Box where it is needed; this will solve my problem?

If(IsBlank(varIsNational)ListName);
if(IsBlank(varIsRegional),Filter(ListName,ColumnName=varIsRegional.ReigionName);



3csman
Impactful Individual
Impactful Individual

Even better...can a multiple statement condition be created and placed Screen 1; App Start.

 

I think that would make it a global condition that would work on all screens, yes?

 

Just spit balling. I don't really know much.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (35,837)