which variable type we can use in catalog item if we need enter multiple author name and book name ?

Community Alums
Not applicable
 
2 ACCEPTED SOLUTIONS

HIROSHI SATOH
Mega Sage

In ServiceNow, if you need to allow users to enter multiple author names and book names in a catalog item, the best variable type to use is Multi-row Variable Set. This allows users to input multiple rows of data, where each row can include fields like "Author Name" and "Book Name."

With a multi-row variable set, you can define variables within each row, allowing users to input multiple authors and books in one request.

 

Other

  1. Reference:

    • Use case: If authors and books are already defined as separate tables in your ServiceNow instance, a reference variable can be used to link multiple records from those tables to the catalog item. This provides a structured and maintainable approach.
    • Example: Create reference fields to the "Author" and "Book" tables, allowing users to select multiple authors and books from lists.
  2. Multi-line text:

    • Use case: For simpler scenarios where you don't need to link to existing records, a multi-line text field can be used to allow users to manually enter author and book names, separated by commas or newlines.
    • Example: Create a multi-line text field named "Authors" and another named "Books", where users can type in the names.

View solution in original post

Ravi Chandra_K
Kilo Patron
Kilo Patron

Hello @Community Alums 

 

As Hiroshi mentioned, Multi Row Variable Set would suit this requirement. with author and Book name fields. 

Refer the below thread to know how to create variable set 

https://www.servicenow.com/community/developer-blog/exploring-the-multi-row-variable-set/ba-p/2291532

 

 

images (4).png

Please Mark this answer as helpful and correct if helped

Kind Regards,

Ravi

View solution in original post

2 REPLIES 2

HIROSHI SATOH
Mega Sage

In ServiceNow, if you need to allow users to enter multiple author names and book names in a catalog item, the best variable type to use is Multi-row Variable Set. This allows users to input multiple rows of data, where each row can include fields like "Author Name" and "Book Name."

With a multi-row variable set, you can define variables within each row, allowing users to input multiple authors and books in one request.

 

Other

  1. Reference:

    • Use case: If authors and books are already defined as separate tables in your ServiceNow instance, a reference variable can be used to link multiple records from those tables to the catalog item. This provides a structured and maintainable approach.
    • Example: Create reference fields to the "Author" and "Book" tables, allowing users to select multiple authors and books from lists.
  2. Multi-line text:

    • Use case: For simpler scenarios where you don't need to link to existing records, a multi-line text field can be used to allow users to manually enter author and book names, separated by commas or newlines.
    • Example: Create a multi-line text field named "Authors" and another named "Books", where users can type in the names.

Ravi Chandra_K
Kilo Patron
Kilo Patron

Hello @Community Alums 

 

As Hiroshi mentioned, Multi Row Variable Set would suit this requirement. with author and Book name fields. 

Refer the below thread to know how to create variable set 

https://www.servicenow.com/community/developer-blog/exploring-the-multi-row-variable-set/ba-p/2291532

 

 

images (4).png

Please Mark this answer as helpful and correct if helped

Kind Regards,

Ravi