Limit one user per entry

Voting APP

In the AgendaTable(Parent Table) which has many differernt options in OptionTable(Child Table) needs to be voted by users, of which they go into VoteTable(SubChild Table) to cast their vote and the vote is recorded using USERMAIL().

I want to limit 1 vote per user per Agenda so if they have voted to any Option, than they are not allow to voted again.

Iโ€™m using Action to link the user to voting page.

The expression I use in the OptionTable(Child Table) to count if they have voted worded

COUNT(SELECT(OptionVotes[AgendaOptionID], AND([AgendaOptionID] = [_THISROW].[AgendaOptionID], [ByWhom] = USEREMAIL()), TRUE))

but this can only count 1 individual option, so how do I make it to where all options can be counted for that Agenda

2 4 913
4 REPLIES 4

Steve
Platinum 4
Platinum 4

If you want to count the number of votes independent of the initiatives, donโ€™t consider the initiatives when looking for the votes:

COUNT(
  FILTER(
    "OptionVotes",
    ([ByWhom] = USEREMAIL())
  )
)

@Steve Thank you Steve, and I have try that to count if the user have voted in that option

I use this expression

FILTER(โ€œOptionVotesโ€, AND([ByWhom] = USEREMAIL(), [AgendaOptionID] = [_THISROW].[AgendaOptionID]))

this will get me the correct user vote under that option, same as your expression, only I add one more criteria, which only under that option ID will be filtered out

But Iโ€™m stuck on how to count up all of there individual option

Would it be better to hide the action once the user has done an action already?

I have a Upvote Action and once a user chooses that action I donโ€™t want them to add to the tally anymore.

What is the best way to go about that?

If you can positively determine that a given user has in fact submitted a vote, you can use that to control the action buttonโ€™s visibility using the Only if this condition is true property of the action.

Top Labels in this Space