How to make if statement for dataset field

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???