Yes/no about multiple conditions

I’m trying to make like and dislike buttons. I have a table of comments and other table of comment votes. When people press the Like button it creates a new row in the vote table with that comment’s id Key, the user’s email, a True in the column for Like, and a " " (clear) for the Dislike column (and vice versa for disliking). My trouble is I’m trying to make the Like button disappear when you’ve liked something but the dislike button to remain and for the Dislike button to act the same way.

I’m having a hard time making a yes/no condition to hide the button that checks the three conditions

  1. For THIS comment
  2. For THIS user
  3. The like/dislike column is blank

Any advice?

Solved Solved
0 2 215
1 ACCEPTED SOLUTION

@Luke_Vancleave

I think this can be achieved by checking the show setting of the Dislike button to see if there is a Comment vote record.
The following is an example of an Action to be placed in the Comment table, which will be displayed only when there is no corresponding user record in the Comment vote table.

ISNOTBLANK(SELECT([Related Comment votes][ID], [Email]=USEREMAIL()))

If you have a screen capture of your schema and current Like/Dislike action settings, we may be able to give you better advice.

View solution in original post

2 REPLIES 2

@Luke_Vancleave

I think this can be achieved by checking the show setting of the Dislike button to see if there is a Comment vote record.
The following is an example of an Action to be placed in the Comment table, which will be displayed only when there is no corresponding user record in the Comment vote table.

ISNOTBLANK(SELECT([Related Comment votes][ID], [Email]=USEREMAIL()))

If you have a screen capture of your schema and current Like/Dislike action settings, we may be able to give you better advice.

SELECT! That’s what I was looking for. Also I needed to make a behavior that created a new row to “Like/Dislike” and then two other behaviors to change that row to “like” or “dislike” and then do it on that selected row. I called it First Like and First Dislike, and then two more called Subsequent Like or Subsequent Dislike. Then I just made a show expression that looked like this
And(
(IN(
Any(Select(Comment Votes[Vote ID],
And(
[Comment ID]=[_Thisrow].[Comment ID]
,
[Email]=Useremail()
)
))
,
Comment Votes[Vote ID]
))
,
NOT(Any(Select(Comment Votes[Down Vote],
And(
[Comment ID]=[_Thisrow].[Comment ID]
,
[Email]=Useremail()
)
))
=“True”)
)

Top Labels in this Space