How to create an option of user consent to make record public/private?

How to create an option of user consent to make record public/private?

So that once the selects private no other user can see the record, and if the current user selects public, then everyone can see.

Solved Solved
0 20 225
3 ACCEPTED SOLUTIONS

I would do the following:

  1. Register the userโ€™s choice in an Enum or Yes/No column, with the display value as a question to the user. Letโ€™s name it โ€œconsentโ€.
  2. Create a column โ€œuserIDโ€ to capture the user who created the record and set its value to USEREMAIL().
  3. Create a slice of your table and set its row filter to the following formula:
    OR(
    [consent] = โ€œpublicโ€,
    [userID] = USEREMAIL()
    )

Perhaps more AppSheet-experienced fellows here can give us a better/simpler way.

Update:
There is also the Tableโ€™s Security filter, that you could fill with the same formula above, instead of creating the slice.

View solution in original post

You can show us some screenshots, of the app editor and the table source.

Alternatively, you can also share a link to your own App editor. HOWEVER, Iโ€™m not experienced enough in AppSheet to assess the security impact of this action, never used it and havenโ€™t read about it.

View solution in original post

If you mean upload various fotos at once, then I donโ€™t know a direct way to do it.

If you mean that you need a column to several photos that you can scroll and click, one way to do it is the following :

  1. Create a Photos table,
  2. Have one column in the Photos table as a reference to Sites table.
  3. Activate the option โ€œIs a part of?โ€, in this column.

In this way, youโ€™ll be able to have several photos in your Site view.

One way to do it, is to have a column of type: Show, with a custom message like: โ€œNo records availableโ€, and make it visible only (Show_if) when there are no records.

View solution in original post

20 REPLIES 20

I would do the following:

  1. Register the userโ€™s choice in an Enum or Yes/No column, with the display value as a question to the user. Letโ€™s name it โ€œconsentโ€.
  2. Create a column โ€œuserIDโ€ to capture the user who created the record and set its value to USEREMAIL().
  3. Create a slice of your table and set its row filter to the following formula:
    OR(
    [consent] = โ€œpublicโ€,
    [userID] = USEREMAIL()
    )

Perhaps more AppSheet-experienced fellows here can give us a better/simpler way.

Update:
There is also the Tableโ€™s Security filter, that you could fill with the same formula above, instead of creating the slice.

Hi KJ Seddik,

Thanks for the response.

I have done the 1st step as you mentioned, however have a question on 2nd bullet point. I already have a column in the sheet thatโ€™s โ€˜Submitted Byโ€™ where email id is captured. I guess this is the place. Could you please assist, if you mean the โ€˜initial valueโ€™ field against the column.

I am quite new into this.

Regards

Yes, this is the place.
In step 2, I meant the โ€œApp formulaโ€ field.

Thanks for the reply again.

I will try that. Could you assist with below, its the entire scenario.

  • If user A (Logged In), should see his/her owns sites that were created historically in one tab. And in another I am trying to display all the sites where other users have selected consent โ€˜Publicโ€™.

Hope this makes sense. Looking forward to your response.

Regards

I assume โ€œsitesโ€ stands for records. But what do you mean by โ€œtabโ€, a separate view?

Yes Sites are the records.

Is there any way I can show you what I am creating?

Regards

Iโ€™m sorry I donโ€™t understand your question. Please elaborate, show what, where?

Sorry, I mean to say - How can I show you the app that I am currently working on.

You can show us some screenshots, of the app editor and the table source.

Alternatively, you can also share a link to your own App editor. HOWEVER, Iโ€™m not experienced enough in AppSheet to assess the security impact of this action, never used it and havenโ€™t read about it.

Here it is.

Please share your email id so that I can add you as the user.

In any case, Iโ€™ll give you a general answer, hoping it helps.

When you create the slice of my first reply, you go to UX and link it to a new View. The user will see all the records he created as well as all the other records marked as public.

While in UX, click on Options tab at the top menu then enable โ€œPreview New Featuresโ€. When you do that, users will be able to filter the view based on any column. A user can filter using the โ€œconsentโ€ column, choosing โ€œPublicโ€ in this case he will see the public records of all other users, or โ€œPrivateโ€ which will show him records created only by the active user.

Otherwise, you can create two separate slices, and link each one to a separate view:

  • One slice will have its row filter formula as: [consent] = โ€œPublicโ€, which will show public records created by all other users.
  • Another slice will have its row filter formula as: [Submitted By] = USEREMAIL(), which will show records created by the active user.
  • While the slice in my first reply, will be the combination of these two.

Hi again,

I could make the user particular sites appear for the selected user. However not sure where it went wrong in creating sites from all users. I wanted to show you if I have done it correctly.

To benefit other users who could have similar questions in the future and to maximize the benefit of this public forum, letโ€™s start with some screenshots please. Thanks.

Sure, sounds wonderful. Here are the screenshots. And yes, your advise really helped me create slices. However not sure if its visible on the maps view in UX.


Also,

  • how can I add โ€˜+โ€™ buttom on maps to add site record form?
  • how can I make top search only work for location, currently its showing filters?

Regards

You have to create a new view, and choose the corresponding slice in the โ€œFor this dataโ€ field.

Go to Behaviour and look for the Add action and make it visible as Overlay. It should then be visible regardless of the view type. Iโ€™ve just tested it.

For each column of your table, thereโ€™s a checkbox called โ€œSearchableโ€. You choose which columns should be used in the search criteria.

You can represent and use any column included in your table.

Hi KJS,

Your reply was helpful. I could do the slicing. Could you please assist on below.

When there are no Active user records, I want to show text โ€˜No records availableโ€™.

Regards

With Appsheet can we also use site status? e.g. Submitted, Pending Approval, Approved

Hi,

Thanks for the reply.

May I ask how can we create an option to add/upload multiple photos in, currently its only allowing me to add one photo.

Regards

If you mean upload various fotos at once, then I donโ€™t know a direct way to do it.

If you mean that you need a column to several photos that you can scroll and click, one way to do it is the following :

  1. Create a Photos table,
  2. Have one column in the Photos table as a reference to Sites table.
  3. Activate the option โ€œIs a part of?โ€, in this column.

In this way, youโ€™ll be able to have several photos in your Site view.

One way to do it, is to have a column of type: Show, with a custom message like: โ€œNo records availableโ€, and make it visible only (Show_if) when there are no records.

Thank you so much for taking time and posting the reply. Your reply helped a lot.

I have posted another question on subscription and slicing without username. Your help would be appreciated.

 

Have a great day.

 

Regards

Top Labels in this Space