This topic contains 4 replies, has 0 voices, and was last updated by SererraMike 7 years, 10 months ago.
-
AuthorPosts
-
January 11, 2017 at 4:09 pm #9757
SererraMikeI’m trying to set a field value in workflow. I’m working on a custom record. I have one field (Field A) that the user enters a decimal value in. After Edit of Field A, I’d like to populate another field (Field B) as Field A + 2000. I could swear I’ve done this hundreds of times before, but when I choose to populate with the formula {fielda} + 2000, I’m simply having 2000 appended onto the end of the value. So if Field A is 2000, instead of getting 4000, I’m getting 20002000. The formula works if I multiple, or subtract. It also works as a result field on a saved search. I’ve also trued SUM({fielda},2000) and I get the same result.
Any help is appreciated.
Thanks,
Mike
This is a cached copy. Click here to see the original post. -
January 11, 2017 at 6:32 pm #9758
k_duncJust by chance, have you tried CASTing or CONVERTing {fielda} to an ‘int’? Or perhaps try TO_NUMBER. Just give something like this a go:
Code:
TO_NUMBER({fielda}) + 2000 -
January 11, 2017 at 7:10 pm #9759
SererraMikeThanks Kirk.
I tried just setting the field to an integer and I get the same result. I didn’t trying CAST or CONVERT though. I tried TO_NUMBER and it works after submit, but not after field edit. I went ahead and tried my original formula after submit, and it works correctly. Looks like the server is interpreting the formula differently than the client.
-
January 11, 2017 at 8:31 pm #9760
michoelIf you workflow is executed client side (on field edit), your formula needs to be Javascript, not SQL
Code:
parseFloat({fielda}) + 2000 -
January 12, 2017 at 8:38 am #9761
SererraMikeThanks Michoel,that seems to do the trick.
-
AuthorPosts
You must be logged in to reply to this topic.