Hello,
I am developing an app that checks shipment tracking statuses. I have a table containing tracking numbers, and every day, an Apps Script is supposed to run and send these tracking numbers to Ship24.com via API. The possible response statuses are: delivered, out_for_delivery, etc.
My bot:
Event occurs: daily
For Each Row In Table: yes.
Process: call a script.
Return value: yes.
Sample of one of the return values:
{"Success":true,"ReturnValue":"{ \"stringValue\": \"delivered\" }","Task Type":"AppsScript","Task Name":"Task for script","ScriptId":"1liNoLPokoBdqdxtTyR9utmTQnBr_F-jYV_vz_e0pTLMdo52vcJZekeZu","FunctionName":"getTrackingStatus","FunctionArguments":"{ \"stringValue\": \"9434611105503870######\" }"}
Next step is to create a new record in tracking_history table.
Column "tracking_id_ref" = [tr_id]
Column "event" = [script].[Output]
And here I get this error:
Error encountered in step with name [New step]: Error: Perform DataAction 'New step Action - 1' failed because Can't add or update a row because a required value is missing. Provide the required value and try again. Row ID to correct: 6IMBqqGYib4v6nbB0xWui0 Missing value in column: event Expected data type: Text Error: Perform DataAction 'New step Action - 1' failed because Can't add or update a row because a required value is missing. Provide the required value and try again.
What can it be?
Thank you.
@pro100bear wrote:
And here I get this error:
Error encountered in step with name [New step]: Error: Perform DataAction 'New step Action - 1' failed because Can't add or update a row because a required value is missing. Provide the required value and try again. Row ID to correct: 6IMBqqGYib4v6nbB0xWui0 Missing value in column: event Expected data type: Text Error: Perform DataAction 'New step Action - 1' failed because Can't add or update a row because a required value is missing. Provide the required value and try again.What can it be?
The row you are trying to update within the Bot has columns that are marked required but the Bot is not setting those columns. Look over the table for the row you are trying update and check all columns set as "required". Either add that column to the Bot and assign it a value OR adjust the "Required If" setting for that column.
This is the thing.
[script].[Output] goes to the required field "event". But the bot not see this [script].[Output].
I just deleted the bot and created it again. Now, only the last tracking ID in my 'tracking_id' table gets updated. If I add another one, the new one becomes the last one, and now the new one gets updated.
Can you show how you have your Bot configured? Specifically, how the Bot Event is defined and how you have the Script Return Value settings defined.
Of course. Attached.
I just wrote a very simple script:
function appendDev(botEvent) {
var text = botEvent || ""; // Use the provided column value
var result = text + "+dev";
Logger.log(result);
return result;
}
It takes data from "tr_id" column and add "+dev". After that bot should update column "status" with final text. For some reasons, only the last row in the table gets updated.
User | Count |
---|---|
17 | |
14 | |
8 | |
7 | |
4 |