Jump to content

adding a £-sign to some but not all entries in a field


fludnelb

Recommended Posts

Helo, newbie here and hoping you can help!

 

I have a field called "PTS" (part-time salary) which has a mixture of numbers and N/A.

 

Where it is a number, I want it to return £+number, but I don't want the N/A to be preceded with a £-symbol.

 

I have tried various combinations with the rules wizards but I can't get it to work. For example, if I put in:

Where PTS is not N/A, then return £+PTS it just seems to 'lose' the rule and comes up blank

 

I've tried the convert number to currency rule and that works for the figures, but the N/A is then also preceded by a £-sign

 

I have tried formatting the actual data in excel so that the numbers appear in currency format, with the £ sign - but there is a big space between the £ sign and the number which looks a bit rubbish, so I would rather do it in Fusion Pro if I can.

 

Are there any Java Script rules that would work?

 

Thanks in advance for any tips!

 

Flud

Link to comment
Share on other sites

Thanks Dan!

 

I had to change it slightly to get it to work - but work it did, and I've been able to adapt it to other variables I've had to do along similar lines...

 

if (Field("PTS") == "N/A")

return "N/A";

//else

return "£" + Field("PTS");

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...