The CreatorCon Call for Content is officially open! Get started here.

Auto numbering an asset tag using a business rule

othomas1
Kilo Guru

Hello all,

Is it possible to auto-number the alm_asset table using a business rule? I have very little experience dealing with business rules. Below is the code i tried at first with just populating the asset tag field with a value of 3, just to see if i could make some progress, no luck. Any tips or suggestions are welcomed.

 

 

find_real_file.png

find_real_file.png

 

1 ACCEPTED SOLUTION

Nia McCash
Mega Sage
Mega Sage

A before Business Rule would only execute when you try to save the record so you don't actually get to see the value of 3 in the form.  Rather, if you saved the record, you should find that the Asset Tag value is 3 when you pull up the saved record.

You might want to use the auto-numbering feature (the same feature that sets automatic incident numbers when you create incidents).  See documentation at: Add auto-numbering records in a table

You can set the default value of javascript:getNextObjNumberPadded(); on the Asset Tag field and possibly avoid Business Rules all together.

View solution in original post

5 REPLIES 5

othomas1
Kilo Guru

So i removed the number field, it still populates but it looks like i can add the record back into the number maintenance table and remove it from the form layout.

 

 

 

 

find_real_file.png