cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PijushRoy
Regular Visitor

User Access Security in Canvas Power App, Database SQL Server

HI Team,

I have 10 users and 12 KPI. I want to show product in Canvas Power App Gallery as per Office 365 User Login Email
Example
If User().Email =  abc@email.com , so KPI A and KPI B
If User().Email =  xyz@email.com , so KPI C
If User().Email =  pqr@email.com , so KPI D, KPI E, KPI F  so on

How to I implement this in below existing code

Existing Code for Gallery. I have one Dropdown filter and Search Box. 

SortByColumns(
        Filter(
        '[dw_staging].[Performance_Dashboard_Table]',
        StartsWith(
            'KPI Short Name',
            TextSearchBox1.Text
        ) && (Dropdown1.Selected.Value = "All" || Goal = Dropdown1.Selected.Value)
    ),
    "Index",
    If(
        SortDescending1,
        Descending,
        Ascending
    )
)

 

Thanks in Advance

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @PijushRoy ,

 

Is this what you want?

SortByColumns(
        Filter(
       If(User().Email= abc@email.com,Filter('[dw_staging].[Performance_Dashboard_Table]',KPI=...),User().Email = xyz@email.com,Filter('[dw_staging].[Performance_Dashboard_Table]',KPI=...),User().Email =  pqr@email.com,Filter('[dw_staging].[Performance_Dashboard_Table]',KPI=...)),
        StartsWith(
            'KPI Short Name',
            TextSearchBox1.Text
        ) && (Dropdown1.Selected.Value = "All" || Goal = Dropdown1.Selected.Value)
    ),
    "Index",
    If(
        SortDescending1,
        Descending,
        Ascending
    )
)

 

Best Regards,

Wearsky

View solution in original post

3 REPLIES 3
PijushRoy
Regular Visitor

Any help please

v-xiaochen-msft
Community Support
Community Support

Hi @PijushRoy ,

 

Is this what you want?

SortByColumns(
        Filter(
       If(User().Email= abc@email.com,Filter('[dw_staging].[Performance_Dashboard_Table]',KPI=...),User().Email = xyz@email.com,Filter('[dw_staging].[Performance_Dashboard_Table]',KPI=...),User().Email =  pqr@email.com,Filter('[dw_staging].[Performance_Dashboard_Table]',KPI=...)),
        StartsWith(
            'KPI Short Name',
            TextSearchBox1.Text
        ) && (Dropdown1.Selected.Value = "All" || Goal = Dropdown1.Selected.Value)
    ),
    "Index",
    If(
        SortDescending1,
        Descending,
        Ascending
    )
)

 

Best Regards,

Wearsky

I will check and confirm
Thanks @v-xiaochen-msft 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,089)