Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I've a variable called vTest = Concat(DISTINCT {$<FlagCY={1},M.FECHA={">=$(#desde)<=$(#hasta)"},M.NIVEL1 ={'01'},M.RESPUESTA ={'Si'},M.MARCA = p(MARCALEVADURA_T)>} ID_SITIO,',')
This vTest output is 15073,15074
I've just created another var called vTest2 = '15073,15074'
Then i've a chart witt the followings expresion :
sum({$<ID_SITIO = {'$(=$(vTest))'},M.MARCA = p(MARCALEVADURA2_T)>} CANTIDADLEVADURA)
sum({$<ID_SITIO = {'$(=$(vTest2))'},M.MARCA = p(MARCALEVADURA2_T)>} CANTIDADLEVADURA)
An its not working with neither both options
If ihardcode this :
sum({$<ID_SITIO = {'15073,15074'},M.MARCA = p(MARCALEVADURA2_T)>} CANTIDADLEVADURA)
Works fine.
Any idea?
Thanks
Albert
Problem Solved.
The problem was that concat was returning the list of values, without quotes in the numbers
i've use : ' "," ' as concat separator, in order to have the list of values separated by commas and surronded with quotes.
Thanks to all.
Albert
Sorry,
The hardcoded expresion should be
sum({$<ID_SITIO = {15073,15074},M.MARCA = p(MARCALEVADURA2_T)>} CANTIDADLEVADURA)
WITHOUT SIMPLE QUOTES
Thanks
It happens sometime and annoying to find out the real reason. Most of the time problems lie with quotes, Dollar sign, or equal to sign. Could you please try once removing = sign from the variables where you created that. If it is there then try by removing it. It's not a solution just some random trial. If u share with your app, I could try help you more efficiently.
Try to use double quotes here:
= {"$(=$(vTest))"}
Hmm, from the description it is not clear if there is '=' sign in the variable definition. Very possible it maybe a reason.
The varible is defined without the equalbefore Concat
when vTest returns just one element, the expresion is working fine, if returns more than one, fails.
It helps. See if the hardcoded this way works (each value in single quotes)
{'15073','15074'}
If it works, modify your variable to enclose each value in the single quotes. Again, I recommend to use double quotes as in my earlier post.
Problem Solved.
The problem was that concat was returning the list of values, without quotes in the numbers
i've use : ' "," ' as concat separator, in order to have the list of values separated by commas and surronded with quotes.
Thanks to all.
Albert