Forum Discussion

bintu85bintu85's avatar
bintu85bintu85
Qrew Trainee
6 years ago

Limit One Record Per Person

Good day,

I have an app with two tables (employees and votes).  I am trying to set it up so that the current user (employee) can only create/submit one vote record.  I attempted to create a relationship with a summary of votes, so that I could create a form rule that says if the current user's vote summary = 1, then hide the ADD VOTE button.  However, there is not an option to hide the ADD button.

Is there something I am missing or is there another way I can set up the app so that only one vote record is allowed per person?

Thank you.

5 Replies

  • SuryaExpert's avatar
    SuryaExpert
    Qrew Assistant Captain
    If an Employee can have zero or one vote, you could just have the vote as a field on the employees table itself. You don't need a votes table.
  • SuryaExpert's avatar
    SuryaExpert
    Qrew Assistant Captain
    Having said that, if you still want to create a separate table for votes for other reasons, you can definitely hide the Add vote button on the form rule. It is just a field that you would put on the form and then hide it in the form rule.
  • You can also make the field on the votes table for [Related Employee] be Unique.  That is a field property setting.  That will definitely block the save.
    • bintu85bintu85's avatar
      bintu85bintu85
      Qrew Trainee
      Thank you!  This option worked and won't interfere with the reports we have already setup for the vote table.