Skip to main content
Question

Increase a Attribute's value by 1 every time a action is performed?

  • November 17, 2025
  • 4 replies
  • 33 views

Forum|alt.badge.img

I’m trying to create a attribute that records every time a specific Sales Order gets rejected. I thought to use a Field Update in the action field on a Customization project to create a running counter, however, I only get the error: “Specific Cast is not valid.” Is there a simple way to do this, or no?

4 replies

Forum|alt.badge.img+7
  • Captain II
  • November 17, 2025

A couple of questions:

What’s the mechanism for an order to be Rejected? Are you using an Action button or a workflow state?

Can you show what you tried so far?


Forum|alt.badge.img
  • Author
  • Freshman II
  • November 17, 2025

A couple of questions:

What’s the mechanism for an order to be Rejected? Are you using an Action button or a workflow state?

Can you show what you tried so far?

It’s just a simple action button. 

 

The method I tried to use was just having the attribute be equal to itself plus one:

 


Forum|alt.badge.img+7
  • Captain II
  • November 17, 2025

Just to confirm, your attribute is expecting a numerical value?

You might try casting the [AttributeREJECTNBR] value as an Integer in the formula.


Forum|alt.badge.img
  • Author
  • Freshman II
  • November 17, 2025

Just to confirm, your attribute is expecting a numerical value?

You might try casting the [AttributeREJECTNBR] value as an Integer in the formula.

It it a number. I’ve already confirmed that pugging in a number works. I’ve tried cint([AttributeREJECTNBR]) + 1 in the formula as well. Same error.