How to make if statement for dataset field

How to make if statement :
when user select more option from field one (tags) more than field two (tags2) in selectionTags must show btn1 .
if field two (tags2) option selected more than field one (tags)must show btn2 .

First of all the question, about which dataset you are talking about?

  1. DYNAMIC ???
  2. NON-DYNAMIC ???

Second provide some infos about your used elements and their IDs.

Third show an ecxerpt of your database including the two TAG-Fields.

And last but not least, where is your already generated code???