Jump to content
  • 0

Getting different result when concatenating fields


Kuroshi

Question

Hi,

I am trying to concatenate my two number fields with a string and it is giving me different result. 

Field A value: 201479652315
Field B value: 201454784878

Here's what I'm trying to do: 
Field A + Field B + '.docx'

And I am getting dis result: 201479652315 2.014547e+4878.docx

Here's the formula i am using: 
CAST([@field:FieldA] as VARCHAR) + CAST([@field:FieldB] as VARCHAR) + '.docx'

Can you help?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @Batchini,

If it is on the Table level, can you try to use the formula below for converting a number to a string instead?:

LTRIM(STR([@field:FieldA], 25, 0)) + LTRIM(STR([@field:FieldB], 25, 0)) +  '.docx'

It seems like the main reason why it is displaying the incorrect result is that the value you're trying to convert exceeds the max size value.

I hope this helps.

- Barbie

Link to comment
Share on other sites

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...