1

Has anyone any good patterns for RSA Archer validation which prevents a user from saving the record when a given date specified is in the future (or past)?

Currently I am catching this using calculated fields after the data has been saved, in a data exceptions report. But ideally I would like to catch this early prior to the user saving the record.

Alex Hollis
  • 98
  • 10

2 Answers2

3

I would suggest that you use custom object in this case.

So remove the basic onclick attribute of the SAVE and APPLY button.

In your custom object, check if the entered date matches the system date (or the time-zone you need). Set a flag. Based on the flag value, you can call the actual function call of the SAVE or APPLY button.

Hope that helps!

Tanveer Shaikh
  • 1,678
  • 14
  • 27
  • Appreciate the custom object code but no client is ever keen to implement custom code and you run the gauntlet for support. – Alex Hollis May 16 '16 at 08:17
3

Alex,
Tanveer is correct. You have to use a Custom Object with embedded JavaScript code to implement described functionality. You will need to create a function that will validate the value entered by the end user and either accept it or make user correct himself.
Now, you have two options how to do it:

1. You can attach your validation function to the Save and Apply buttons as Tanveer described. I have shared a similar code in the following question before. You can review it here: LINK

2. You can attach your validation function to the element you plan to validate directly. So when user is done with given input element and input element loses focus your function will be called. Here is a sample code with jQuery:

$('#elementid').blur(function() {
  // validate entered value here
  // if required show a pop-up message
  WarningAlert(msg, title);
});

Good luck!

Community
  • 1
  • 1
Stan Utevski
  • 582
  • 2
  • 9
  • Thanks for the reply, I'm looking to avoid custom objects. – Alex Hollis May 16 '16 at 08:18
  • @AlexHollis Alex, if so, then the functionality you asked about can't be implemented in Archer v5.5.x without using Custom Object. Archer platform is powerful and flexible to some extent, but there are some things you still have to write code for. I know that "dynamic validation" functionality have been requested as an enhancement multiple times from RSA already. You can participate in RSA hosted workgroup meetings and request to have this functionality delivered sooner. Good luck! – Stan Utevski May 18 '16 at 19:52