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

Auto populate a text field

servicenow14710
Tera Expert

Hello developers, Can anyone share the logic,  i need to auto populate a text field once if any user registers/submit an order(catalog form) for the first time. If another user registers then the auto populated number should be incremented by 1. Any help is appreciated . Thanks!

7 REPLIES 7

SunilKumar_P
Giga Sage

Hi @servicenow14710, Can you provide more detials like on which table you have have the field that should be incremented? Do you want to increment this field everytime the particular catalog form is submitted or for all the catalog forms?

 

Regards,

Sunil

 

@SunilKumar_P : Hi sunil, this is for particular catlaog item. The field which is getting incremented is a text field. Thanks for your reply!

Amit Verma
Kilo Patron
Kilo Patron

Hi @servicenow14710 

 

Below could be an approach :

 

1. Query the RITM table to check if any RITM already exists for the particular catalog item. If yes, then a user has already requested the catalog item previously. Take a count of the RITMs for the item and increment it by 1 to get the auto populated number. If no RITM exists, it is the first submission so the text field could be updated to have value as 1.

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.