cancel
Showing results for 
Search instead for 
Did you mean: 

Check last letter in a string

Former Member
0 Kudos

Good Day All,

I have a string field that does not a Consistence length.

I want to check the last of this field and concatenate some text depending on the result.

I've tried this but does not work.

if mid({usp_wb_Reporting_AssetsUnderManagement_A2a_Main;1.account_long_name,1 Len{usp_wb_Reporting_AssetsUnderManagement_A2a_Main;1.account_long_name}-1) = "M"

then {usp_wb_Reporting_AssetsUnderManagement_A2a_Main;1.account_long_name} & " Managed"

else {usp_wb_Reporting_AssetsUnderManagement_A2a_Main;1.account_long_name} & " Unmanaged

Basically I'm check the length and if return an M it's Managed everything else is Unmanaged.

Thanks

DM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

if you want to check last letter then try this

if right({usp_wb_Reporting_AssetsUnderManagement_A2a_Main;1.account_long_name},1)="M" then

then {usp_wb_Reporting_AssetsUnderManagement_A2a_Main;1.account_long_name} & " Managed"

else {usp_wb_Reporting_AssetsUnderManagement_A2a_Main;1.account_long_name} & " Unmanaged

Regards,

Raghavendra

Former Member
0 Kudos

Thanks did not try the right funtion.

Answers (0)