BerryHoning

Simplifying a new field

Discussion created by BerryHoning on Mar 29, 2016
Latest reply on Mar 29, 2016 by BerryHoning

I need to make an export file from a few variables, so that it can be imported in another type of database. For this, I need to break a repetitive field and change it into one text like this:

 

a -> z

b -> y           and together it becomes z|y|x, so also with adding the |

c -> x

 

Now I have created the following:

 

*round1

 

Case

(

GetRepetition (classificatie 1272 2008;1) ="Acute dermale toxiciteit (Categorie 1)";"Acute tox. 1 (Dermaal);H310";

GetRepetition (classificatie 1272 2008;1) ="Acute dermale toxiciteit (Categorie 2)";"Acute tox. 2 (Dermaal);H310";

GetRepetition (classificatie 1272 2008;1) ="Acute dermale toxiciteit (Categorie 3) ";"Acute tox. 3 (Dermaal);H311";

GetRepetition (classificatie 1272 2008;1) ="Acute dermale toxiciteit (Categorie 4)";"Acute tox. 4 (Dermaal);H312";

[and a lot more of these values]

)

 

&

 

If(GetRepetition (classificatie 1272 2008;1 )>0 and GetRepetition (classificatie 1272 2008;2 )>0;"|";"")

 

*round2

etc. till round 20.

 

This works. BUT...

1. I have many values I need to replace by other text items. (Could add up to 167 items in the future.)

2. I need to do this 20 rounds for every repetitive field.

This gives me a variable definition of about 20 A4 pages long, which is ridiculous.

 

Does anybody know how to simplify this?

Outcomes