I have scenario were the I want to generate sequence number based transaction i.e when when adding the line to PR sequence number to be generated automatically and for other PR sequence should again start from 1 again
I have scenario were the I want to generate sequence number based transaction i.e when when adding the line to PR sequence number to be generated automatically and for other PR sequence should again start from 1 again
Don’t think you’ll be able to achieve this with config, rather you’d have to do this as a modification.
Hi There
I have achieved something similar to this before but it isn’t possible with just customisations, you will need access to the database and have the access to create a custom sequence and trigger.
Regards
Lee
Hi WyrLeelew,
Can you please give the step and also please let me know whether end user also needs to have the access.
Hi
You will need IFSAPP level access to create the Sequence and Trigger in the IFS Database.
Sequence Code
create sequence <Specify Sequence Name Here>minvalue 200000maxvalue 9999999999999999999999999999start with 200000increment by 1nocache;
Trigger
CREATE OR REPLACE TRIGGER <Trigger Name Here> BEFORE INSERT OR UPDATE ON <Table Name Here> FOR EACH ROWBEGIN IF INSERTING THEN :NEW.<Field Name> := IFSAPP.<Sequence Name>.NextVal; END IF;
This should get you part way to your goal but you don’t get a number reset.
Another option could be to use the Default Value functionality for the custom field and create an expression that looks for a previous line and increments the value by 1 or defaults to 1 if its the first line.
I hope this is helpful
Regards
Lee
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.