Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
As you can see in the attached file, i load some data from an excel file
Then i check if the field [codice agevolazione] is equal to some determined values, and in that case i use some variable to set a new field [aliquota stato]:
if([codice agevolazione] = 'A0100', '$(vAliqStatoA0100)',
if([codice agevolazione] = 'A0160', '$(vAliqStatoA0160)',
if([codice agevolazione] = 'B0210', '$(vAliqStatoB0210)',
if([codice agevolazione] = 'E0100', '$(vAliqStatoE0100)',
if([codice agevolazione] = 'H0100', '$(vAliqStatoH0100)',
if([codice agevolazione] = 'L0100', '$(vAliqStatoL0100)',
if([codice agevolazione] = 'L0110', '$(vAliqStatoL0110)',
if([codice agevolazione] = 'R0100', '$(vAliqStatoR0100)',
if([codice agevolazione] = 'A0000', '$(vAliqStatoA0000)',))))))))) as [aliquota stato]
When i run the script i get multiple rows for each original row, as if QV found more than one value in the [codice agevolazione] field
This is completely unexpected, and i cannot understand why it works this way
Any idea?
Do those variables have values? Since the new result is the expression to display a variable, if the variable is blank it will return nothing.
You can try setting one of the variables to see what it does.
Edit:
I just looked at your file, try linking this table to the original. It seems to be creating multiple records due to there not being a direct link, so for every line from the main table you get it multiplied by the total lines from the resident table.
I also have no experience working with Replace loads or partial reload functions so I may be completely off.
Have you tried this?
'$(vAliqStato' & [codice agevolazione] & ')' as [aliquota stato]
tried now, without success (i get blank as result for [aliquota stato])
Do those variables have values? Since the new result is the expression to display a variable, if the variable is blank it will return nothing.
You can try setting one of the variables to see what it does.
Edit:
I just looked at your file, try linking this table to the original. It seems to be creating multiple records due to there not being a direct link, so for every line from the main table you get it multiplied by the total lines from the resident table.
I also have no experience working with Replace loads or partial reload functions so I may be completely off.