# Prevent double validation by the same person

**URL:** https://discuss.workflowgen.com/t/prevent-double-validation-by-the-same-person/1450
**Category:** Form Designer
**Created:** [August 13, 2019, 2:40pm UTC](https://discuss.workflowgen.com/t/prevent-double-validation-by-the-same-person/1450 "2019-08-13T14:40:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Bertrand](https://avatars.discourse-cdn.com/v4/letter/b/a88e4f/32.png) [@Bertrand](https://discuss.workflowgen.com/u/Bertrand)
#### Post date: [August 13, 2019, 2:40pm UTC](https://discuss.workflowgen.com/t/prevent-double-validation-by-the-same-person/1450/1 "2019-08-13T14:40:05Z")

</div>

Hello,  
I have 2 groups of validations (G1 and G2).  
One person belongs to both groups and I would like when validating the first action (in G1) that it can not validate the second action (in G2).  
How to do ?

---

<div class="post-metadata">

### Author: ![qpomarel](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/qpomarel/32/262_2.png) [@qpomarel](https://discuss.workflowgen.com/u/qpomarel)
#### Post date: [August 13, 2019, 3:18pm UTC](https://discuss.workflowgen.com/t/prevent-double-validation-by-the-same-person/1450/2 "2019-08-13T15:18:23Z")

</div>

Hello Bertrand,

You can do a check on your G1 action with an SQL query in the code behind. You can check if the G1 user is in the G2 group.

You can check the result in a hidden field and used this as a condition in your workflow.

SQL query example:

```auto
  SELECT * FROM USERS
  INNER JOIN WFPARTICIPANT_MAPTO ON WFPARTICIPANT_MAPTO.ID_USER = USERS.ID_USER
  INNER JOIN WFPARTICIPANT ON WFPARTICIPANT.ID_PARTICIPANT = WFPARTICIPANT_MAPTO.ID_PARTICIPANT
  INNER JOIN WFPROCESS ON WFPROCESS.ID_PROCESS = WFPARTICIPANT.ID_PROCESS
  WHERE USERS.USERNAME = 'USERNAME' 
  AND WFPROCESS.NAME = 'PROCESS_NAME'
  AND WFPARTICIPANT.NAME = 'PARTICIPANT_NAME'

```
