rrdwitt Posted March 7, 2019 Share Posted March 7, 2019 Hi, I searched the forum but cannot find this rule. Nor am I probably not asking the correct question. I want to add a "$" to a field if the "$" is not there, but to NOT add the "$" if the "$" is in the data. So "123" would be changed to "$123". But "$456" would stay "$456". Thanks all!! Quote Link to comment Share on other sites More sharing options...
sschardan Posted March 7, 2019 Share Posted March 7, 2019 This should work for your scenario: if (Field("Fieldname").indexOf("$") > -1) {return Field("Fieldname")} else {return ("$" + Field("Fieldname")) Hope this helps Quote Link to comment Share on other sites More sharing options...
sschardan Posted March 7, 2019 Share Posted March 7, 2019 oops, have a parenthesis instead of a bracket, use this: {return ("$" + Field("Fieldname")} Quote Link to comment Share on other sites More sharing options...
rrdwitt Posted March 7, 2019 Author Share Posted March 7, 2019 Awesome! Thanks! Much appreciated! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.