We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Need suggetion for getRowCount()

Sengeni
Tera Contributor

Hi, I need a alternative way to remove getRowCount from these script by using glideRecord. Refer the below code as sample.i need suggestion as soon as possible.

Sengeni_0-1707221862087.png

Thanks,

sengeni

 

1 ACCEPTED SOLUTION

It will do the same thing if you add a counter in the while loop VS getRowCount.

But that is something you can do alternatively

var loop_count = 0;

inside while
loop_count++;

 

-Anurag

View solution in original post

5 REPLIES 5

Anurag Tripathi
Mega Patron

Hi,

Can you elaborate what do you mean by 'alternative way to remove getRowCount ' ?

It is being used as a paremeter that you have used in the event. Can you elaborate on what you are asking?

 

-Anurag

Sengeni
Tera Contributor

Hi,

I am using getRowCount() in my script.but instead of that can we use any other parameter to count the row using glideRecord.I am using getRowcount() in gs.event queue .but i need any other parameter to count

It will do the same thing if you add a counter in the while loop VS getRowCount.

But that is something you can do alternatively

var loop_count = 0;

inside while
loop_count++;

 

-Anurag

Anubhav24
Mega Sage

Hi @Sengeni ,

You can try using GlideAggregate assuming you want to replace getRowCount().

Replacing GlideRecord with GlideAggregate and a 'COUNT' aggregate will help to improve the performance.

 

Please mark correct/helpful if my response helped you.