I want to get some certain numbers from the pyID to return column of the decision table how can I achieve that ?
Example -
pyID - M-22001 (I want to get the fist two numbers from the pyID to the return column of the decision table)
return column expression - “FC”+.ManufacturedYear+“-”+.pyID (I’m currently using this Expression but this expression gives me the whole pyID I only want the first two numbers of the pyID )
you can make use of whatComesAfterLast and substring function to get first 2 digit of Case ID and the append the return value with needed string to get the expected result.
If you are going for this approach advantage will be in future if you are changing the case id prefix from “M” to double digit values like “FM”, “GM”..etc. this code will work in expected way no need to have any code change.
Function = @substring(@String.whatComesAfterLast(Param.Case_ID,‘-’),“0”,“2”)
Param.Case_ID = This parameter should have case id value.