Solved

Change Request auto create default value

  • 27 January 2020
  • 2 replies
  • 700 views

Userlevel 2
Badge +6

When I create a new Change Request Record I would like to Auto Populate the “CR No:” with text like the following.

ABC-0001

Where the 0001 would increment up as a sequence.

 

So after creating 5 Change Request I would have the following “CR No:” in the system.

 

CR No:

ABC-0001

ABC-0002

ABC-0003

ABC-0004

ABC-0005

Any help would be greatly appreciated.

 

icon

Best answer by Himasha Abeywickrama 28 January 2020, 13:19

View original

2 replies

Userlevel 7
Badge +18

 Hi @clint1028,

 

I don’t believe there’s a way of doing this through the application. You will have to create a oracle sequence for the Request No in the database and a BEFORE INSERT trigger which you can concatenate the string (‘ABC’) and the sequence number (‘001’). The trigger will look like this,

 

CREATE OR REPLACE TRIGGER eco_req_trig

BEFORE INSERT ON ECO_REQUEST_TAB 

FOR EACH ROW

BEGIN

  SELECT CONCAT('ABC-',eco_sequence.NEXTVAL)

  INTO   :new.request_no

  FROM   dual;

END;

/

 

However, it’s better to create a case and dispatch to IFS In order to get this done through a customization.

 

Hope this helps!

Userlevel 4

One option
Create new custom LU
When change request is created launch event what add line to this LU, change request id and your own id what you combine in sql event action.
Then custom field to original change request view to show value from this new custom LU

Hopefully you got my point what I try to explain ;)

Reply