Skip to Content
avatar image
Former Member

Agentry - Transaction Validation Rules behavior

Hi,

We have a created set of Validation Rules of Error Type, for a Transaction.

Upon validation failure, the error message is displayed as popup with Ok button.

On clicking OK button, the Transaction screen is again displayed to get the user input. i.e. The transaction is still alive.

Is there a way to close/cancel the current transaction(screen), in case of validation error, and go back to the Object screen(Previous) from which this transaction was initiated ?

More detail with screenshots

Object Detail Screen – Button “Add Crew Member” will initiate a transaction

Upon clicking the “Add Crew Member” button in the screen, the Transaction was initiated to get the Crew Member detail.

Validation error message appears and is displayed – Fine, till now.

On click OK, in the above popup, the same transaction screen is displayed as below.

Can we cancel/close this transaction screen in case of error and display the Object screen, from which this transaction was initialized?

Regards

Elavarasan S

2.png (6.2 kB)
3.png (9.7 kB)
1.png (6.1 kB)
4.png (6.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 13, 2014 at 03:58 PM

    Elavarasan,

    In a nutshell, no it is not currently possible to have a validation rule automatically cancel a transaction.  The validation rules are intended to confirm the input data meets certain criteria prior to saving the transaction and either stop the user from proceeding (Error) or give the use the option to stop and correct or continue as is (Warning).

    The expectation is that if the user encounters an Error they are returned to the transaction so that they can correct the problem and re-save the transaction (executing the validation rules again).  Users can always decide to cancel the transaction if they are unable to correct the error but the key thing is that it is the user's decision. 

    Since most transactions involve more than one input field if the transaction was automatically cancelled the user would lose the other data that was already entered. 

    --Bill

    Add comment
    10|10000 characters needed characters exceeded

    • Elavarasan,

      Like Bill mentioned, you can't do this in a transaction.  One alternative would be to handle your data entry using normal detail screens and instead using silent transactions (a transaction that does not use a screenset to interact with the user) to save the data, or navigate screens based on validation:

      Create a detail screen that accepts scan input, define an "OK" or "Finish" button on the screen.  When the user scans and hits Finish, you run a "ValidateScanInput" Action that holds a single sub-action set by rule.  Sub-Action rules are used to programatically decide which Action to run next.  This rule scrapes the screen to get the scanned value (using the object browser to specify the screenset, screen and field in a rule) and then validates it.  It either runs "ScanInputValid" Action, or "ScanInputInvalid" Action.  In your valid action, you close the screen and do whatever else you need to do, maybe saving the scanned value with a silent transaction.  In your invalid action, you pop a message box to alert the user, then close the screen to return to your prior screen.

      This is an alternative to using traditional transaction interaction with screens to give you more flexibility in your UI flow.

      Jason Latko - Senior Product Developer at SAP