How to create a module that points to a specific "Import Set table" in Load Data

Paulo Machado
Kilo Sage

Hi folks,

I need to create a new module that directs the user to a specific data source and loads a particular Import Set table.

Unfortunately, it’s not possible to pass parameters to the Data Source page. It works on the Edit module page, but not on the Data Source page.

I’m considering creating a new table with an attachment field and a Business Rule to automatically run the data source.
I’d like to know if there’s an easier or alternative way to implement this functionality, or if creating a new table is indeed the best approach.

Thanks in advance.

1 ACCEPTED SOLUTION

@lauri457 

I agree your solution will also help but it's a customization which can be avoided by simply training the users on how to use the OOTB Load Data module.

Having customization will involve maintaining the code over period of time during upgrades.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

8 REPLIES 8

GlideFather
Tera Patron

Olá @Paulo Machado,

 

you mean a module which after clicking it will pre-populate any of this?

GlideFather_0-1760984914797.png

 

Or I misunderstood it? 😛

 

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Yes @GlideFather 

I’d like the custom module to populate the Import Set table field with "u_import_test_table", for example.

@Paulo Machado,

please describe the whole use case.

 

A user (all or just some) click on the module and the module is opened with a value (what value?) in the "u_import_test_table" field?

 

If so, it could be done by:

(1) a default value for the field sys dictionary (but only one default value is allowed),

(2) onLoad client script

(3) onDisplay BR

 

It's important to assure it will not break any other processes - default value will be populated at any case, CS or BR can give you some conditions and different values to assign it..

 

Let me sleep for it and I will try to play with that in my PDI tomorrow :))) just let me know if I got it ok now

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Like this:

PauloMachado_0-1760993643304.png

The goal is to have the module open the Load Data page and automatically set the Import Set table field to u_import_set_test.