Scoped Applications & Autonumber

Steve Gibson
Giga Guru

Hello,

We are just starting to develop with Scoped Applications however have hit what seems to be a basic issue....

When creating a new application we want to also create a new table (not extended of any other table), this is easy enough. We also want to auto number with a new prefix, after selecting the option on the table and entering our prefix the table is updated ok, However when creating a new record on the table there is no number automatically generated as expected.

Also, when checking Number Maintenance the new prefix is there but the table is not linked, when selecting the table and updating the table is being removed.

Has anyone had any experience with auto-numbering within Scoped Applications? I have searched the wiki and community to no avail at the moment.

My only option current is to go back to update set development which we are trying to move away from.

Thanks,

1 ACCEPTED SOLUTION

kduong
Giga Contributor

I believe your going to have to recreate the table. I have a similar problem and   the table can't be linked is because the table name/label was over the max length allowed.


View solution in original post

5 REPLIES 5

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hi Steven,



If you look at the dictionary entry of the the number field you've added, there should be something in there like the following which is what actually sets the number:



2446bb2528.png


Hi Brad,



Apologies, I cannot see any attachment on your reply


It should show up as an inline image or link to the image.



Basically, you should a dynamic default value or function name that's something like Get Next Padded Number. That is the mechanism for retrieving the number from the number maintenance table.


javascript:global.getNextObjNumberPadded();



Checked that the default value was there earlier and it was. I've just created a new scoped app and it appears to be working as expected now, which is strange as I tried a couple of times this morning and had a colleague double check I wasn't being an idiot.....strange!



Looks like a small hiccup somewhere along the way, I'm sure there will be more with scoped apps before we are finished.



Thank you and kduong   for your replies!