Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
Is it possible to get below given output from the input data using front end expression.
Hi,
I am not sure it is, as you need some sort of 'explode()' function.
Much easier (and more flexible) to do at script load...
Thanks,
Azam
Hi,
Try this:
SubStringCount(Concat(Dept_List),',')
HTH
Sushil
I thought that at first too, but I think it will fail as the example given needs a distinct count of departments.
Cheers,
Azam
PFA
It is working as expected
I just tested Sushil's expression and it seems to be working well:
Sushil's expression actually counts the number of commas (',') which is incorrect(because in that distinction is not being considered). Try adding more rows with repeated department - you will see the wrong output.
I guess it's going to be a tricky one (if at all possible) in the front-end.
Ok, but I think this may be more good fortune - I'm not sure it will generalise to more complex cases, the concat() function results in an undefined dept 'BA' in the intermediate results and it is only correct for EMP2, because 'D' is repeated, if EMP2 were A,B,C,D,E, it would return the wrong result (4 insted of 5)...but yes it works for this exact example.
Thanks,
Azam
try to do it in the script level that would be the best to achieve it, front expression will not be sure on this kind of case
Hi Azam,
I want to do this in expression level. Not like the method used in attached file
Thanks,
Anoop