synergy46

I think my calculation is causing unnecessary padding???

Discussion created by synergy46 on Jan 5, 2014
Latest reply on Jan 7, 2014 by erolst

I am using FM 13 Adv on Mac and Windows.

 

I am using a custom function called GetItemRank. It looks into a valuelist and returns the left to right numeric placement of a given string.

I pass parameters: $$MemberType and look into: $$MemTypes

 

GetRankScript.png

I can see in Debug that the values are there.

 

GetItemRank.png

As you can see, GetItemRank returns 3 when it should be 2. I suspect this is because $$MemTypes has unnecessary 'padding'.

I tried trim and trimstring but nothing seems to work.

 

Your ideas are appreciated.

Am I on the right track about the 'padding'???

 

Thanks

 

Ron

Attachments

Outcomes