However, a problem has occurred.
Let’s say there are users a, b, and c.
If user a clicked on fruit news, I would like to make sure that only user a cannot see fruit news. I made a database list on Airtable and Google Sheets. Users who have clicked on the news want to make the news that they have already seen no longer appear, but when they use this code, the news is deleted so that everyone can’t be seen by all users. How can I prevent the news from appearing only to users who have seen it?
There is not enough information to provide an answer and you are explaining the issue as if we all know the details of your blocks and your Google sheet.
However, let me guess situation with you.
You have your list of news in a Google sheet and displaying this list using DVL (Data Viewer List) and you want the app to show only news that has not been read/displayed for that specific user.
If this is correct then you need a minimum of TWO sheets
Sheet1 (News Sheet)
This sheet should contain a column to identify the news. It should be unique. I will call it News ID. The sheet can have news title, news source, news URL and so on.
Sheet2 (Users sheet)
Again there should be a unique User ID and other columns like user name and other profile info. This sheet contains a column that has a list of News ID entries. I’ll call it Watched List.
In your app, whenever the user clicks on a news link, the app should search for the user in the User Sheet and add the News ID to the list of watched list column.
Your app will display only the news that the News ID is not available in the Watched List for that specific user.
I’m not sure I understand your situation specially all your table names and column names are non-English.
However, if you followed my suggestion then every news has a unique News ID. You need to update the row with this News ID so next time you will see that this news is already seen by this user.
I don’t know how to set this up. User sheet when user clicks on news? Did you see the row you clicked on the 2nd sheet? I want to put the value as the user ID.
This is the DVL program you posted in another post.
This code takes the word sheet on screen 2 and creates a temporary text sheet on screen 1. Right?
I want a remake similar to this one.
There is screen 1 and screen 2. Screen 1 shows the temporary newssheet shown to the user. Screen 2 is the original news information sheet. The user sees screen 1.
User can click news on screen 1 viewed. If you click on temporary news on screen 1, you want to add user ID to the original newssheet with the same information. How can I do this? Please let me know if there’s anything you don’t understand
In this example, I am updating sheet1 using the row id of the search result of the matching number with my selected number.
You will have to do the same but you need to search for matching news with your selected news. If you use the URL then you need to find the URL in the main news table and get the row number which you will use to update the correct row.
ok! As you said, the user ID is entered fine. But there is a problem. I put the filter function exactly as you did, but the filter works only when the app is turned off and on again. What should I do?
When the user ID is not entered, the filter code to show or hide news works normally, and now the user ID is entered in the news line well, but the filter does not work.
And I think I misunderstood this article. What do you mean by making two sheets? One to make a news sheet and the other to make a user’s information sheet? I’m confused as to whether there was an error when I made the sheet.
Hello,
I made a quick demo which should show how to deal with the situation you are facing.
Because it is a demo I did not make a login screen but instead I use a variable UserNo which you can use to run the project with different user name. My table has 3 users so you can set the variable to 1, 2, or 3.
Th screen has two different DVL the upper one is the solution and you will see that when you click in a news row it will disappear from the list. If you then stop the project and change the UserNo you will see the news for that user and not for the other user.
The DVL in the lower part of the screen is for you to see how the information is changing once you click in a news row. The DVL will also reset the user to the start to see all news again.