Argument or Script Include?

Roberto18
Giga Contributor
Hello Folks,
I'm new to development on the now platform, in some modules an argument was placed:

find_real_file.png
Sorry, company policy
So, logically, the following argument was assembled:


(situacaoIN6,9^prefixo=9909) or (situacaoIN7,10^prefixo_super=9909) or (situacaoIN8,11)



Is there any way to assemble an argument to put in the module? Or will I have to make an include script and access it from the module
Thank you for your attention

 
4 REPLIES 4

Community Alums
Not applicable

I don't think you can assemble something directly from the module. I've always used either script include or direct JS as an argument . Example :

fn_preferences.do?sysparm_query=sys_id=javascript:var gr = new GlideRecord('fn_preferences');gr.query();gr.next();answer=gr.getUniqueValue();

Community Alums
Not applicable

What exactly you want to achieve? 

Roberto18
Giga Contributor
Hello,
Interesting sir, but I found an answer in the link below:
 
I wanted to set up a complex query, which consisted of filtering three groups that already have their complexity

Thanks for the effort 😉
 

n21lv1
Tera Contributor

Hey,

You can sure use complex code in the Arguments field if it supports Javascript, but I would heavily recommend creating a Script Include instead. It's much easier to read, debug and maintain than a one-line monstrosity without any code highlighting.

On the other hand, if your argument is simply an encoded query that doesn't require any dynamic data that can only be gathered by code, you can simply build the condition in the table list view and then right-click the Filter breadcrumbs -> Copy query, and use that query in that Arguments field.