Hi Manish,
Here is a Knowledge Base article that goes over the steps for creating a sequentially increasing number based upon a relationship:
https://community.quickbase.com/quickbase/topics/how-can-i-set-up-a-numbering-system-to-track-quotes...It goes over the steps by step. One caveat is that it makes use of the # of related records to track the sequence so if records are deleted it can throw the numbering off. We usually recommend disabling deletion of records on that table to avoid this happening and instead use a status of inactive to filter out records that are no longer valid on your reporting. This is also a method that works going forward but doesn't automatically work for pre existing records if you have a large volume of existing records. I hope this article is helpful Manish.