You are viewing limited content. For full access, please sign in.

Question

Question

Integer Token Display in Workflow Generated eMail is null not 0 - how can I fix?

asked on July 27, 2015 Show version history

Hi all,

I have a summary report being generated with a series of searches that update tokens.

It's working just fine but when the results are zero (0) the email displays the token value as a null value or blank space.

Do I need to do something to assign 0 to integers that have a null search count result?

Here is the display

Summary Report of OCR Status for ABC's Document Repository
Please do not reply, this is an automated service and will not respond.
Audit of OCR STATUS Commenced at 28/07/2015 4:44:57 PM
ABC Total Document Count = 13,851
     Total count of documents with ALL pages OCRed  = 13,827
     Total count of documents with SOME pages OCRed = 17
     Total count of documents with NO pages OCRed   = 7  
XXX Total Document Count = 529
     XXX documents with ALL pages OCRed  = 529
     XXX documents with SOME pages OCRed = 
     XXX documents with NO pages OCRed   = 
YYY Total Document Count = 69
     YYY documents with ALL pages OCRed  = 69
     YYY documents with SOME pages OCRed = 
     YYY documents with NO pages OCRed   = 

 

The eMail code per block is as:

 


<b>ABC Total Document Count = %(Total Search Result Count#"##,###"#)</b>

     Total count of documents with ALL pages OCRed  = %(Whole Repository OCR=ALL#"##,###"#)
     Total count of documents with SOME pages OCRed = %(Whole Repository OCR=SOME#"##,###"#)
     Total count of documents with NO pages OCRed   = %(Whole Repository OCR=NONE#"##,###"#)  

Note my use of the ##,### to insert the comma, is there another formatting expression to force the display of '0'?

Cheers,

Will

0 0

Answer

SELECTED ANSWER
replied on August 5, 2015

This looks to be by design in .Net number formatting (which is What Workflow uses behind the scenes). See Microsoft documentation, notice the example for 0.45678 formatted as "#.##" which returns a value of .46 not 0.46.

If you change your format to ##,##0 instead of ##,###, that will ensure the 0 stays when it's by itself. 1234 will still be converted to 1,234.

1 0

Replies

replied on July 29, 2015

Seems to work fine for me. What do the instance details look like? Did the search run correctly? Was the Results Count token generated?

1 0
replied on July 28, 2015

Where do those tokens come from?

0 0
replied on July 29, 2015 Show version history

I created these tokens with the output of the searches.

ie.

 

Search "Whole Repository OCR=ALL":

(({LF:AssociatedPages="Y"} & {LF:OCR=all}) & {LF:LOOKIN="ABC\"}) - {LF:LOOKIN="ABC\zzDeveloper"}

Token assignment:

Whole Repository OCR=ALL = %(RetrieveOCRALLinWholeRepository_Result Count)

See the screen grab of the Assign Tokens that follows the parallel search criteria.

 

I have set them as Integers hoping that they would display 0 and the numbers for the other counts.

Screen Shot 2015-07-29 at 5.26.54 pm.png
0 0
replied on August 4, 2015

The tokens are definitely generated because when they are non-zero they display correctly.

 

ie 

 

Total count of documents with ALL pages OCRed  = 14,397
     Total count of documents with SOME pages OCRed = 50
     Total count of documents with NO pages OCRed   = 4

 

and

 

Corporate AP documents with ALL pages OCRed  = 529
     Corporate AP documents with SOME pages OCRed = 
     Corporate AP documents with NO pages OCRed   = 

 

 

BUT I've just noticed that in a previous test there were '0' tokens reported:

 


Pluto & Charon Total Document Count = 215 

Total OCR ALL = 99
Total OCR PARTIAL = 69
Total OCR NONE = 47

Nyx AP Total Document Count = 30 
Nyx AP OCR ALL = 24
Nyx AP OCR PARTIAL = 6
Nyx AP OC NONE = 0

Styx AP Total Document Count = 30
Styx AP OCR ALL = 20
Styx AP OCR PARTIAL = 10
Styx AP OCR NONE = 0 

 

The only difference was I added HTML formatting...

Might have to dig along these lines? 

0 0
replied on August 4, 2015

Actually I believe I have found it - to do with the numeric formatting of the value to put a comma in for '000s.

 

ie: "#"##,###"#"

 

See the screen grabs attached below.

In the first two instances you can see that a single digit entry as a test '1' works properly, and the 1000 displays as 1,000. But '0' produces no result at all.

 

Could you please see if you can replicate this result?

 

Screen Shot 2015-08-05 at 3.36.52 pm.png
Screen Shot 2015-08-05 at 3.37.11 pm.png
Screen Shot 2015-08-05 at 3.37.28 pm.png
0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.