cancel
Showing results for 
Search instead for 
Did you mean: 

How to check The size of the response from Salesforce

vkandalam
New Contributor II

Hi I am getting this as a response from Salesforce SOQL Query Snap I would like to check how many Ids we have in the response. In this instance I have to 2. And I want to perform a different action if the size is greater than 1

image

1 ACCEPTED SOLUTION

viktor_n
Contributor II

Hi @vkandalam,

There is a function called: snap.in.totalCount.
For each id, it will return a number starting from 0(you need to add + 1 at the end) all the way to the last id.
the last id will contain the number of the total IDs. You can get the last id with the snap Tail.

Or you can also get the number with the Aggregate snap.
image

Regards,
Viktor N.

View solution in original post

1 REPLY 1

viktor_n
Contributor II

Hi @vkandalam,

There is a function called: snap.in.totalCount.
For each id, it will return a number starting from 0(you need to add + 1 at the end) all the way to the last id.
the last id will contain the number of the total IDs. You can get the last id with the snap Tail.

Or you can also get the number with the Aggregate snap.
image

Regards,
Viktor N.