Jump to content

First 2 Characters in a Field, and Last character in field only


Movad

Recommended Posts

There is probably a simple solution to this, but I don't know the javascript portion of fusionpro very well yet.

 

I have to get 2 special variable fields based upon a graduation year from a mail list.

 

1) I need the grad year to equal a $ amount, so for instance if the database has "1972" in as the grad year, I need it to return "19.72".

 

2) I need to use only the last digit of the grad year as another variable, so using the same "1972" instance, I would need it to return just "2".

 

Thanks,

 

Mario Lima

Movad

Graphics Department

Link to comment
Share on other sites

1) I need the grad year to equal a $ amount, so for instance if the database has "1972" in as the grad year, I need it to return "19.72".

return FormatNumber("0.00", Field("GradYear");

 

2) I need to use only the last digit of the grad year as another variable, so using the same "1972" instance, I would need it to return just "2".

return Right(Field("GradYear"), 1);

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...