I am just talking about any single entry in the database. If a respondent is uploading multiple files , I just want the data(in Database for Contents) from the newest file they upload.
Thank you for the clarification. I assume you have some respondent ID (such as the SERIAL) to identify unique respondents.
There are three approaches for your use case:
(1) Use dbGet()
- if the result is NULL then there is no entry yet.
(2) Simply use dbSet()
, it will overwrite the existing entry by default, so you'll always have the latest entry in the database.
(3) Do not use the database at all, but panelRecords() to eventually retrieve the most recent data for a person.