- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 12:36 AM
Hi,
If i am running the Back ground script i can see the incident record why i can see this record only.
any specific reason why i am able to see
INC0010001
Please find the attached SS for the same please help me out the clear explanation on the same.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 01:07 AM - edited 08-17-2023 01:11 AM
Hi @kranthi2 , Sorry got you question wrong this is something reply for the same
As you have used If condition it will exit the loop with the First ever satisfactory condition, That means "INC0010001" is the first record in the loop which satisfies the query condition and terminates the loop.
Please find below image for the same:
Thanks & Regards,
Eswar Chappa
Mark my answer correct and Helpful if this helps you 😀

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 12:39 AM - edited 08-17-2023 12:39 AM
Hi @kranthi2
Because you are using if for iterating through the query result, change if to while, it will give you all the results.
Also, instead of incGR.number, use inGR.getValue("number") and similarly for short description
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 12:44 AM
Thanks for the quick response.
yes i have used the while but still i am having a question there are many incidents are there why it is showing
INC0010001
Instead of it will some other right. i mean any kind of business logic is present at the script level
Here my question is why it is not displaying INC0010012/INC0010021/INC0000015/---and so on why it is INC0010001 only.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 12:51 AM - edited 08-17-2023 12:52 AM
Hi @kranthi2 ,
You did not change this:
Also, instead of incGR.number, use inGR.getValue("number") and similarly for short description.
When you use dot walk, it returns an object which is used in JavaScript by Reference. Therefore your record always includes a reference to the same object. so use getValue() instead.
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 12:59 AM - edited 08-17-2023 01:04 AM
Hi @kranthi2 as you have used If condition it will exit the loop with the First ever satisfactory condition, That means "INC0010001" is the first record in the loop which satisfies the query condition and terminates the loop.
Thanks & Regards,
Eswar Chappa
Mark my answer correct and Helpful if this helps you 😀