Question / Problem
How do I get the value of a Kintone App’s field and pass it to another Kintone App using the GET REST API?
Thank you in advance
Current Situation
First, I want to fetch the value of the Company List App’s Street Address
field value (Ex/ Groove Street
).
Then, I want to pass the text string to Sales Deals App’s Street Address
field.
Company List App
Value of Street Address:
Sales Deals App
I want to pass the “Groove street
” value to this Kintone App:
Code / Attempts
Here is my GET REST API call:
### kintone REST API Requests - App Records
@domain = INSERT_SUBDOMAIN.kintone.com
@appId = INSERT_APP_ID
@apiToken1 = INSERT_API_TOKEN_1
@apiToken2 = INSERT_API_TOKEN_2
@userCode = Administrator
### GET/records
GET https://{{domain}}/k/v1/records.json?app={{appId}}
X-Cybozu-API-Token: {{apiToken1}}
### POST/records
POST https://{{domain}}/k/v1/records.json
X-Cybozu-API-Token: {{apiToken1}}, {{apiToken2}}
Content-Type: application/json
{
"app": {{appId}},
"records": [
{
"Company_Name_Search": {
"value": "Kintone"
},
"Deal_Name": {
"value": "Kintone app creation"
},
"Rep": {
"value": [{"code": "{{userCode}}"}]
}
},
{
"Company_Name_Search": {
"value": "Cybozu"
},
"Deal_Name": {
"value": "Kintone JavaScript customization"
},
"Rep": {
"value": [{"code": "{{userCode}}"}]
}
}
]
}
### DELETE/records
DELETE https://{{domain}}/k/v1/records.json?app={{appId}}&ids[0]=1
X-Cybozu-API-Token: {{apiToken1}}
### POST/file
POST https://{{domain}}/k/v1/file.json
X-Cybozu-API-Token: {{apiToken1}}
Content-Type: multipart/form-data; boundary=----20111107kintone20111107cybozucom
------20111107kintone20111107cybozucom
Content-Disposition: form-data; name="file"; filename="kintone.jpg"
Content-Type: image/jpeg
< ./kintone.jpg
------20111107kintone20111107cybozucom--
### PUT/record for updating file
PUT https://{{domain}}/k/v1/record.json
X-Cybozu-API-Token: {{apiToken1}}
Content-Type: application/json
{
"app": {{appId}},
"id": "1",
"record": {
"Attachment": {
"value": [{
"fileKey": "your_file_key"
}]
}
}
}
Desired outcome / Expected Behavior
I want to copy the street address value:
To this street address field code: