Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I'm trying to extend a selection on a field by clicking a button. I defined an action on the field [FInicio EjercicioMes]:
='(' & concat(distinct chr(34) & [FInicio EjercicioMes] & chr(34), '|') & '|' &
concat(distinct chr(34) & p({1<[PeriodoTAM2]={1}>} [FInicio EjercicioMes]) & chr(34), '|')
& ')'
so, my aim is to mantain the current selection of [FInicio EjercicioMes] and add those [FInicio EjercicioMes] with [PeriodoTAM2]={1}.
I am not sure if there is a grammar mistake or I took a wrong way...
Thanks in advance.
Marc.
The field value is actually numeric. Your format changing has caused the issue. Expression should be:
='(' &
concat( {$+1<[PeriodoTAM2]={1}>} distinct ([FInicio EjercicioMes]), '|')
& ')'
Note: $ -> denotes current selection. This makes your expression simpler.
Try:
='(' & concat(distinct chr(39) & [FInicio EjercicioMes] & chr(39), '|') & '|' &
concat(distinct {1<[PeriodoTAM2]={1}>} chr(39)& [FInicio EjercicioMes] & chr(39), '|')
& ')'
The result is like a clear: nothing selected on [FInicio EjercicioMes]...
Use the above expression in a text box and see the output string. How does it look?
I obtained different formats from each concat values. I've modified the expression:
='(' & concat(distinct chr(39) & date(MonthName([FInicio EjercicioMes]),'MM-YYYY') & chr(39), '|') & '|' &
concat(distinct {1<[PeriodoTAM2]={'1'}>} chr(39)& date(MonthName([FInicio EjercicioMes]),'MM-YYYY') & chr(39), '|')
& ')'
and the string is: ('01-2014'|'02-2014'|'04-2014'|'05-2014'|'06-2014') , where the two first values are the selection and the other three are the wanted addition. But it doesn't work... same result: nothing selected.
Try without chr(39). Single quotes are causing the issue.
='(' & concat(distinct date(MonthName([FInicio EjercicioMes]),'MM-YYYY') , '|') & '|' &
concat(distinct {1<[PeriodoTAM2]={'1'}>} date(MonthName([FInicio EjercicioMes]),'MM-YYYY') , '|')
& ')'
same result. I add a qvw example...
The field value is actually numeric. Your format changing has caused the issue. Expression should be:
='(' &
concat( {$+1<[PeriodoTAM2]={1}>} distinct ([FInicio EjercicioMes]), '|')
& ')'
Note: $ -> denotes current selection. This makes your expression simpler.
It works fine. Thank you!