cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ClaireAllen
Post Partisan
Post Partisan

Clear Browse Gallery

Hello Community,

 

I am fairly new to Power Apps, and I'm trying to clear the Browse Gallery once the form has been submitted or only display current user information, as I would like others not to be able to see content due to confidential information

 

Can anyone help me with this please,  I have searched the community but I'm not able to find anything that can help me, but apologise if there is already a post out there.

I would like this screen to refresh when the form is submitted, or only display current user information.

ClaireAllen_0-1610984262533.png

I would appreciate any help to resolve this, 
Screen shots on how to, would also be appreciated,
Thank you
Claire

 

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User II
Super User II

Hi @ClaireAllen 

You could have a field in your datasource called Submitted.  In the OnSuccess property of the form, 

 

 

Patch(datasource, Form1.LastSubmit, {Submitted:true})

 

 

Make the items property of the gallery Filter(datasource, Submitted = false).  If your current gallery Items property is something like

 

Sort(SearchByColumns(datasource,TextSearchBox1.Text,"somefield"),"somefield",If(SortDescending1,Descending,Ascending))

 

you could replace datasource with a temporary variable like 

 

With(
     {wdatasource: Filter(
                          datasource,Submitted=false
                     )},
   SortByColumns(
        Search(
               wdatasource,TextSearchBox1.Text,"somefield"
        ),"somefield",If(
                         SortDescending1,Descending,Ascending
                      )
         )
     )
)

In the above formulas you would replace datasource with your table and somefield with the actual field name you use to search and sort the table.

 

 

View solution in original post

4 REPLIES 4
JayMagness
Super User
Super User

Hi,

 

In the form there is an On Success option put Navigate(<Table or Gallery>) once you select to Submit Form it should do what you want.

Drrickryp
Super User II
Super User II

Hi @ClaireAllen 

You could have a field in your datasource called Submitted.  In the OnSuccess property of the form, 

 

 

Patch(datasource, Form1.LastSubmit, {Submitted:true})

 

 

Make the items property of the gallery Filter(datasource, Submitted = false).  If your current gallery Items property is something like

 

Sort(SearchByColumns(datasource,TextSearchBox1.Text,"somefield"),"somefield",If(SortDescending1,Descending,Ascending))

 

you could replace datasource with a temporary variable like 

 

With(
     {wdatasource: Filter(
                          datasource,Submitted=false
                     )},
   SortByColumns(
        Search(
               wdatasource,TextSearchBox1.Text,"somefield"
        ),"somefield",If(
                         SortDescending1,Descending,Ascending
                      )
         )
     )
)

In the above formulas you would replace datasource with your table and somefield with the actual field name you use to search and sort the table.

 

 

View solution in original post

Thank you @JayMagness 

This is what I see when I start typing Navigate, I entered what you mentioned but received an error message, so I tried to enter Navigate(BrowseScreen1), but when I submitted the form, it did not clear my data to show blank fields.

ClaireAllen_0-1611050053777.png

 

Thank you @Drrickryp 

I used the following method as suggested, and I've manged to get it to do what I wanted.

ClaireAllen_1-1611051071146.png

Thanks for the assistance,

 

Kind regards

Claire

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (18,089)