cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
satishpandey
Level: Powered On

How to display SharePoint list for Admin users

First of all, I would like to thanks the PowerApps community for the quick response. I am new to this tool and community and trying to learn. Apologize for asking very basic questions. I always try to search similar answers before posting my questions to this forum.

 

I have created an intake form in PowerApps and used SharePoint list as a data source.

 

I have two set of users:

1) The requester, who will just submit a request in Intake.

2) Admin user

I have created 5 screens,  New, Edit, View, Thankyou and Home Screen

 

I have set Home  Screen as default screen and created 3 buttons, New Request, Previously submitted request by me, View and Edit previously submitted intakes.

 

My queries:

1) I want End users  to just submit a new request (which I am able to do) and redirect to thank you page, but unable to display previously submitted/recently submitted values by the same user.

 

2) On the home screen, I added a Gallary and connected to my list to pull all the previously submitted data. I can see just the first column and then >  arrow showing.l  am unable to display as it is data showing in rows in the list.

 

3)On the submitted intake, I want the user to see their intake with the data they submitted but they should not be able to edit the records. I have already created a view screen but unable to capture previously submitted data in view only mode.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How to display SharePoint list for Admin users

HI @satishpandey ,

How do you store the Requester users and Admin users within your app?

Do you initialize two collections to store the Requester users and Admin users separately within your app?

 

For your first question, do you not want the requester user to click "Previously submitted request by me" button within your Home Screen?

I assume that you store the Requester users and Admin users into two separated collections via their email address within your app, the formula as below:

Set the OnStart property of the App or the OnVisible property of the Home Screen (first screen of your app) to following:

ClearCollect(
RequestersCollection,
"User1@email.com",
"User2@email.com",
"User3@email.com",
...
); ClearCollect(
AdminsCollection,
"AdminUser1@email.com",
"AdminUser2@email.com",
"AdminUser3@email.com",
...
)

Based on the needs that you mentioned, I think the DisplayMode property of the Buttons could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the DisplayMode property of the "Previously submitted request by me" button to following:

If(
   User().Email in AdminsCollection,  /* <-- Check if current user is in AdminsCollection. The Requester user could not click this button */
DisplayMode.Edit,
DisplayMode.Disabled )

 

For your second question, within your Gallery control, you could consider add other controls (e.g. Label control) within it to custom your Gallery. E.G. you could add a Label control within your Gallery, then set the Text property to following:

ThisItem.ColumnName /* <-- Specify the column you want to display*/

Please check the following GIF screenshot for more details:Test.gif

 

 

For your third question, do you want to display the previously submitted record within the Display form in your View screen?

Based on your needs, I think the LastSubmit property of the Edit form could achieve your needs. On your side, please take a try with the following workaround:

Set the OnSuccess property of the Edit form (EditForm1) to following:

Set(SubmittedRecord, EditForm1.LastSubmit)

Set the Item property of the Display form in your View screen to following:

SubmittedRecord

Or set the Item property of the Display form in your View screen to following formula directly:

EditForm1.LastSubmit

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: How to display SharePoint list for Admin users

HI @satishpandey ,

How do you store the Requester users and Admin users within your app?

Do you initialize two collections to store the Requester users and Admin users separately within your app?

 

For your first question, do you not want the requester user to click "Previously submitted request by me" button within your Home Screen?

I assume that you store the Requester users and Admin users into two separated collections via their email address within your app, the formula as below:

Set the OnStart property of the App or the OnVisible property of the Home Screen (first screen of your app) to following:

ClearCollect(
RequestersCollection,
"User1@email.com",
"User2@email.com",
"User3@email.com",
...
); ClearCollect(
AdminsCollection,
"AdminUser1@email.com",
"AdminUser2@email.com",
"AdminUser3@email.com",
...
)

Based on the needs that you mentioned, I think the DisplayMode property of the Buttons could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the DisplayMode property of the "Previously submitted request by me" button to following:

If(
   User().Email in AdminsCollection,  /* <-- Check if current user is in AdminsCollection. The Requester user could not click this button */
DisplayMode.Edit,
DisplayMode.Disabled )

 

For your second question, within your Gallery control, you could consider add other controls (e.g. Label control) within it to custom your Gallery. E.G. you could add a Label control within your Gallery, then set the Text property to following:

ThisItem.ColumnName /* <-- Specify the column you want to display*/

Please check the following GIF screenshot for more details:Test.gif

 

 

For your third question, do you want to display the previously submitted record within the Display form in your View screen?

Based on your needs, I think the LastSubmit property of the Edit form could achieve your needs. On your side, please take a try with the following workaround:

Set the OnSuccess property of the Edit form (EditForm1) to following:

Set(SubmittedRecord, EditForm1.LastSubmit)

Set the Item property of the Display form in your View screen to following:

SubmittedRecord

Or set the Item property of the Display form in your View screen to following formula directly:

EditForm1.LastSubmit

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 173 members 4,145 guests
Please welcome our newest community members: