Instance scan check script creation

smita6
Tera Contributor

I am new to instance scan check scripts.
I want to create an instance scan check script where table is item_option_new if type is not Reference, List Collector, or Lookup Select Box, then variable values for fields reference and reference_qual is empty. Then show the findings and results.In the script i have to use engine object.
It would be good if someone helps me.

3 REPLIES 3

pavani_paluri
Tera Guru
Tera Guru

Hi @smita6 ,

 

To achieve this using "table check" scan type as well. Below are the steps to do it:

1. Go to Instance Scan → Checks → New.
2. Choose Table Check.
3. Fill in:
- Table: `item_option_new`
- Condition: type is NOT Reference, List Collector, or Lookup Select Box
- Field Validations:
- `reference` must be empty
- `reference_qual` must be empty
4. Save the check.
5. Run the scan → it will list any variables that break the rule.

 

But if you want to check the existing records, using Test Check button.

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P

Hi Pavani P,

I am new to instance scan scripting:

How to write Field Validations inside this function.Can you tell me please?:

 (function(engine) {

 

 

})(engine)

 

How to write field validation code in function(engine) can you  tell me ?