There is two groups in canvas app and I selecting their names in canvas app form ,the name selected from one group should not be same as other group name,if select the same name in other group it should show error message.please help with me guys.

There is two groups in canvas app and I selecting their names in canvas app form ,the name selected from one group should not be same as other group name,if select the same name in other group it should show error message.please help with me guys.
You could try in the OnChange of the second group box putting something like this:
If(1stgroup=2ndgroup, Notify("Groups can't be the same", NotificationType.Error))
You will have to change first group and 2nd group to wherever those values come from.