# total by select " gaia-argoui-select" ( option pick in gaia-argoui-app-viewtoggle)

**URL:** <https://forum.kintone.dev/t/total-by-select-gaia-argoui-select-option-pick-in-gaia-argoui-app-viewtoggle/356>\
**Category:** General\
**Created:** [October 29, 2020, 1:51am UTC](https://forum.kintone.dev/t/total-by-select-gaia-argoui-select-option-pick-in-gaia-argoui-app-viewtoggle/356 "2020-10-29T01:51:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [October 29, 2020, 1:51am UTC](https://forum.kintone.dev/t/total-by-select-gaia-argoui-select-option-pick-in-gaia-argoui-app-viewtoggle/356/1 "2020-10-29T01:51:36Z")

</div>

hello anyone,

This code just get all records in index show page.&nbsp;

&nbsp;

//call api records return from server  
function fetchRecords(appId, opt\_offset, opt\_limit, opt\_records) {  
var offset = opt\_offset || 0;  
var limit = opt\_limit || 100;  
var allRecords = opt\_records || [];  
var params = { app: appId, query: ‘limit ’ + limit + ’ offset ’ + offset };  
return kintone.api(’/k/v1/records’, ‘GET’, params).then(function (resp) {

allRecords = allRecords.concat(resp.records);  
if (resp.records.length === limit) {  
return fetchRecords(appId, offset + limit, limit, allRecords);  
}  
var tong = 0;  
allRecords.forEach(function (item, index) {  
tong += Number(item.見積小計.value);  
//外注見積小計,機材見積小計  
console.log(item.外注見積小計.value);  
console.log(item.機材見積小計.value);

// tong += Number(item.機材見積小計.value);  
});  
return tong;  
});  
}

- but my prolems is i trust want to get total of these records went i pick in class " gaia-argoui-select-label"&nbsp; or "gaia-argoui-select " and count sum it.

– please help me understanr or give me some API—

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [October 29, 2020, 5:09am UTC](https://forum.kintone.dev/t/total-by-select-gaia-argoui-select-option-pick-in-gaia-argoui-app-viewtoggle/356/2 "2020-10-29T05:09:48Z")

</div>

![](https://developer.kintone.io/hc/user_images/k7gaKTV6_xYoazAGU_Xh0A.png)in cosole.log, i just only get 40 records, while my list have 43 records? help me get 43 records Sir, thank you so much.

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [October 30, 2020, 5:26pm UTC](https://forum.kintone.dev/t/total-by-select-gaia-argoui-select-option-pick-in-gaia-argoui-app-viewtoggle/356/3 "2020-10-30T17:26:17Z")

</div>

Hi NDC,&nbsp;

&nbsp;

I wanted to make sure what you are trying to do is get the records displayed under the conditions you selected in the list.  
Am I correct?

&nbsp;

The relevant process is for retrieving all records.  
If you want to retrieve the records through the API, you can specify the query condition to get the records that match the condition.  
If you specify each list’s query condition, you can get the records that match the condition by specifying the query.

&nbsp;

If you knew that you need to set up the query,  
and you want to change the value you get based on the list you are selecting, you may do the following;

&nbsp;

1. Determine the list
2. Create a request based on the filtering criteria set in the list.
3. Record retrieval by API execution

&nbsp;

As for which list you are selecting, you can determine from the viewID.

&nbsp;

Display record data in a custom view:  
[https://developer.kintone.io/hc/en-us/articles/900000010623-Display-record-data-in-a-custom-view](https://forum.kintone.dev/hc/en-us/articles/900000010623-Display-record-data-in-a-custom-view)

&nbsp;

For creating a request based on the filtering criteria set in the list, there are a couple of ways to do this.  
In the simple method, you have to write the conditions for the list in the code beforehand.  
In an easy way, you can use the following API to obtain the conditions to narrow down the list of records and make a request.

&nbsp;

Get Record List:  
[https://developer.kintone.io/hc/en-us/articles/213148937-Get-Record-List](https://forum.kintone.dev/hc/en-us/articles/213148937-Get-Record-List)

&nbsp;

Hopefully, this helps.

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [October 31, 2020, 6:55am UTC](https://forum.kintone.dev/t/total-by-select-gaia-argoui-select-option-pick-in-gaia-argoui-app-viewtoggle/356/4 "2020-10-31T06:55:26Z")

</div>

Dear Sean Tachibana,

yes, i know this but i dont know “Create a request based on the filtering criteria set in the list.”&nbsp;

this image is my ID, and i want to filter each my option ![](https://developer.kintone.io/hc/user_images/8UNDhk6LYc-kr1KM0meduA.png)

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [October 31, 2020, 4:12pm UTC](https://forum.kintone.dev/t/total-by-select-gaia-argoui-select-option-pick-in-gaia-argoui-app-viewtoggle/356/5 "2020-10-31T16:12:39Z")

</div>

Hi NDC,

&nbsp;

\>i know this but i dont know “Create a request based on the filtering criteria set in the list.”

&nbsp;

Were you able to check the help page I sent you last?  
There are couple of ways to create a request based on the filtering criteria set in the list.  
One is to write the conditions for the list in the code beforehand or  
you can use the following API to obtain the conditions to narrow down the list of records and make a request.

&nbsp;

Get Record List:  
[https://developer.kintone.io/hc/en-us/articles/213148937-Get-Record-List](https://developer.kintone.io/hc/en-us/articles/213148937-Get-Record-List)

&nbsp;

Display record data in a custom view:  
[https://developer.kintone.io/hc/en-us/articles/900000010623-Display-record-data-in-a-custom-view](https://developer.kintone.io/hc/en-us/articles/900000010623-Display-record-data-in-a-custom-view)

&nbsp;

\>this image is my ID, and i want to filter each my option

&nbsp;

As for this one, please refer to the following page.  
A ViewID, a unique ID given to the view, would be necessary to determin the list.  
ViewID could be found in the custom view settings screen.

&nbsp;

Create a custom view:  
[https://developer.kintone.io/hc/en-us/articles/115002436434-Create-a-custom-view](https://developer.kintone.io/hc/en-us/articles/115002436434-Create-a-custom-view)

&nbsp;

Hopefully, this helps.

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [November 1, 2020, 8:47am UTC](https://forum.kintone.dev/t/total-by-select-gaia-argoui-select-option-pick-in-gaia-argoui-app-viewtoggle/356/6 "2020-11-01T08:47:26Z")

</div>

hi Sean Tachibana

Done , Thanks you ! Dev teams.&nbsp;
