Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I am using match function to expand a variable in 2nd parameter and give the position and the pick function to expand and return the result of the variable.
='Sales by ' & Pick(match(GetCurrentField([Group]),'No','=''$(vProdAlias)'''),'No1','=''$(vProdAlias)''')
Thanks!
Try this expression:
='Sales by ' & Pick(Match(vGroup, 'No', '=' & Chr(39) & chr(36) & '(vProdAlias)' & Chr(39)),'No', vProdAlias)
This should do it:
='Sales by ' & Pick(Match(GetCurrentField([Group]), 'No', '$(vProdAlias)'), 'No1', '$(vProdAlias)')
Hi Jonathan,
Thanks for the reply. However the expression is still not working.
Could you please use the app
Try this expression:
='Sales by ' & Pick(Match(vGroup, 'No', '=' & Chr(39) & chr(36) & '(vProdAlias)' & Chr(39)),'No', vProdAlias)
Thanks a lot Sunny! It is working
Just to have a better understanding could you please tell me why chr().
I understand that we have to store ='$(vProdAlias)' as string. But why it doesnt work with escape characters-
'=''$''(vProdAlias)'''''
But it works with your solution(with chr())??
'=' & Chr(39) & chr(36) & '(vProdAlias)' & Chr(39)
Chr(36) is a dollar sign which doesn't get evaluated, but $ this gets evaluated. That's the way it works, don't really know why though
Best,
Sunny
Thanks for the help!
Not a problem
I am glad I was able to help.
Best,
Sunny