0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Zoho CRM】Delugeでeach_sliceする

Last updated at Posted at 2025-07-11

結論

startIndex = 0;
listSize = baseList.size();
chunkSize = 100;
loopCount = (listSize / chunkSize).ceil();
counter = leftpad("1",loopCount).replaceAll(" ","1,").toList();
for each  i in counter
{
	if(startIndex + chunkSize > listSize)
	{
		chunk = baseList.subList(startIndex,listSize);
	}
	else
	{
		chunk = baseList.subList(startIndex,startIndex + chunkSize);
	}
	startIndex = startIndex + chunkSize;
    // do something
}

用途

取得したレコードを一括更新する際、上限である100件ずつに分けて更新する等

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?