Discussions

Expand all | Collapse all

Limit One Record Per Person

  • 1.  Limit One Record Per Person

    Posted 10-02-2018 19:06
    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.


  • 2.  RE: Limit One Record Per Person

    Posted 10-02-2018 19:13
    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.


  • 3.  RE: Limit One Record Per Person

    Posted 10-02-2018 19:36
    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.


  • 4.  RE: Limit One Record Per Person

    Posted 10-02-2018 19:51
    Thank you!


  • 5.  RE: Limit One Record Per Person

    Posted 10-02-2018 19:38
    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.


  • 6.  RE: Limit One Record Per Person

    Posted 10-02-2018 19:51
    Thank you!  This option worked and won't interfere with the reports we have already setup for the vote table.