Queue Item Value has additional 0's at the end

I’m struggling to understand what is happening, but basically I have a set of values like 36.45. This is how it comes out of my SQL query and if I display the data table they’re stored in thats how they show up. However, when I add them to an Orchestrator queue as a string it will display 36.4500 . Could anyone explain to me why this is happening and how to fix it?

Hi and welcome to the community!
This is because of default formatting of this numeric type, you can do like this:

String.Format(CultureInfo.InvariantCulture, “{0:00.00}”, YOUR_VALUE)

1 Like

Hey Bcorrea,
Thanks for your help. Do you mean I should do this when I’m adding my queue item information. Or should I just format the data after run my query?

this is only when you need to write this number as a string, in your case for the queue only.

1 Like

Yea that makes sense. I’ll give it a shot. Thanks for your help!

1 Like

I’m Haveing trouble implementing this code that you gave me. I’m not really sure how to go about it. Would I do it in the Item information right here?

If so how would I write it?

Where where you writing before that was giving you the wrong “number” format?

Write like this in Value Column

String.Format(CultureInfo.InvariantCulture, “{0:00.00}”, row(“Result”).ToString)

actually that will not work… cant use that ToString in the row(“Result”)…

Well If I look in the queue its the wrong format. Here is where I’m trying to write it:


String.Format(CultureInfo.InvariantCulture, “{0:00.00}”, Cdbl(row(“Result”).ToString))

this might work

in your case try like this

String.Format(CultureInfo.InvariantCulture, “{0:00.00}”, Cdbl(in_TransactionItem.SpecificContent(“Result”).ToString))

I’m getting this error if I use your syntax:

sorry but also would give him the format he dont want, row(“Result”) is already a double, if you do a simple ToString then he gets the default format and problems will still be there…

Yes change that line of the result, to:
String.Format(CultureInfo.InvariantCulture, "{0:00.00}", row("Result"))

String.Format(system.Globalization.CultureInfo.InvariantCulture, “{0:00.00}”, Cdbl(in_TransactionItem.SpecificContent(“Result”).ToString)) try this on typeinto activity

and keep the queueitem as before

add this system.Globalization. in front of CultureInfo

That works. You’re both amazing.


the difference is that if you convert as you need the information, than you would need to convert it every time, but if you write in the queue already converted, then you just need to do the in _transactionitem.SpecificContent(“Result”) and it would be already good format…

Sorry my qoute should have been better. I did put it in the Item inforamtion. But It needed the system.Globalization to work. I agree that I would much rather have the data go in correct. You both have been very helpful and I really appriciate it.