Skip to main content


Hello, I've been testing out the Document Automation solution and I'm having a hard time handling numbers that have the negative symbol at the end. The learning instance is not able to categories the data type as “Accounting”, only as a “Number”, thus showing a format error when the negative is at the end. 

 

I tried using the gen AI prompting to move the symbol or recognize the number as a negative. 

  • The prompt I used was provided by someone from AA but unfortunately it has not worked. 

I tried using different locale number formatting. 

I tried using different field and document rules. 

Use: Handling Remittance Advice
Document Type: User Defined (Gen AI driven data extraction) 

Could someone please help me find a work around for this as all these documents come to validation, taking up a lot of time. Thank you very much. 

See the image below for an example. 

 

 

Hi ​@Jess_Mkg,

 

Check this one below: 👇👀

https://upskill.automationanywhere.com/learn/video/working-with-field-and-validation-rules

 

Try this:

Field Rule Functionality

Operators: “Ends with” → “-”

Functionality: “Replace characters in the value”

 

Cheers

Marc

 


Hi ​@Jess_Mkg ,

This issue arises because the negative sign at the end (e.g., 80.73-) is not being recognized as a valid negative number in Automation Anywhere's Document Automation solution. Since the system categorizes it as a regular "Number" rather than "Accounting," it does not interpret it correctly.

Possible Workarounds

1. Preprocessing with Gen AI Prompt (Enhanced)

Since the Gen AI prompt didn't work as expected, try refining it. Instead of just instructing it to recognize the number as negative, explicitly tell it to reformat the number properly.

Try this Gen AI prompt: "If a number has a trailing negative sign (e.g., '80.73-'), move the negative sign to the front (e.g., '-80.73'). Return all numbers in standard numeric format."

2. Use a Custom Extraction Rule (Post-processing Rule)

If the AI model is extracting 80.73-as text, use a Custom Post-processing Rule in Automation Anywhere:

  • IF the extracted value ends with -
  • THEN move - to the front using a script (e.g., Python, JavaScript, or Automation Anywhere's String Manipulation).

Example: 

IF (ExtractedValue ends with "-")  
    THEN ExtractedValue = "-" + RemoveLastCharacter(ExtractedValue)  

This ensures proper formatting before validation.

3. Apply a Data Transformation in the Automation Script

If a CSV, Excel, or database is being used after extraction, apply a script or formula to adjust the format before final processing.

For Excel Processing, use this formula:

=IF(RIGHT(A1,1)="-", "-" & LEFT(A1, LEN(A1)-1), A1)

This moves the negative sign to the front automatically.

4. Locale & Regional Format Adjustment

Since you already tried different locales, ensure the regional settings in the Control Room and validation phase match the expected accounting format (e.g., US/UK vs. European formats).

Final Thoughts

The best approach is to use Gen AI prompting and a post-processing rule together for handling this format dynamically. If the issue persists, Automation Anywhere may need to refine how Gen AI models interpret accounting formats.

Let me know which method works best, or if you need more details!


Reply