TASK_ROW_UPDATE

Knowledgebase

TASK_ROW_UPDATE

Function Overview

The TASK_ROW_UPDATE function updates only the current row in your active Google Sheet. It lets you describe the changes you want using natural language, and a language model processes your instructions along with the rowโ€™s data to make the modifications automatically.

Uses

  1. Update a rowโ€™s values by writing a natural language instruction.
  2. Transform data in-place without the need to write complex formulas.
  3. Adjust row information quickly based on clear, simple instructions.

Syntax and Parameters

=TASK_ROW_UPDATE(prompt, [model])

Parameter Data Type Required Description
prompt

string

Required A clear instruction describing how to update the current row. For example,

"Set the Status column to Completed and the Date column to today."

model

string

Optional The language model identifier in the format

"provider/model_name"

. If left blank, the default model is used.

Advanced Options

Optional Model Parameter

If you have a specific language model in mind, you can pass its identifier as the second parameter. For example:

=TASK_ROW_UPDATE("Capitalize all text in this row and update the Date column to today.", "Gemini/gemini-1.5-pro")

How It Works in the Background

  • The function gathers the header row and the current row where it is used.
  • It appends a note to the prompt so that only the current row values are changed.
  • A language model processes the TOML-formatted data along with your instruction and returns the modifications, which are then applied solely to the current row.

Customization Tips

  • Write detailed and specific instructions. For example, instead of โ€œupdate rowโ€, try โ€œset the cell under column D to โ€˜Yesโ€™ and increase the value in column F by 10%.โ€
  • Use simple language to ensure the system clearly understands your intent.

Examples

Example 1: Changing a Status Value

To update a row so that its "Status" cell becomes โ€œCompletedโ€, enter this formula in any cell of that row:

=TASK_ROW_UPDATE("Change the Status column to Completed")

Example 2: Multiple Changes with a Specific Model

Update the row by capitalizing all text and updating the date with a specific model:

=TASK_ROW_UPDATE("Capitalize all text in this row and update the Date column to today.", "Gemini/gemini-1.5-pro")

Example 3: More Detailed Instruction

To transform the first name format and adjust the Total column value, use:

=TASK_ROW_UPDATE("Transform the first name to start with a capital letter and change the Total column by adding 5 to its value.")

Best Practices

  • Double-check your prompt: Write detailed instructions to help the language model generate the intended result.
  • Avoid modifying the header: Ensure instructions reference only the current row to prevent altering the header row.
  • Test with a small change first: Use simple instructions on a test row before applying changes to important data.
  • Use clear language: Avoid ambiguous terms; instead of โ€œfix rowโ€, state โ€œchange the cell under column C to Bold.โ€

Troubleshooting

Missing Required Parameter: "prompt"

Ensure that your function includes a text prompt enclosed within the quotation marks.

Invalid Function Type

Verify that you are using TASK_ROW_UPDATE and that your parameters are correctly formatted.

No Changes Occurring

Check that your instructions reference the correct column names and that your active row is as intended. Also, ensure there are no extra spaces or typos in your prompt.

Model Unresponsive or Incorrect Output

If the model does not produce the expected changes, try using the default model by leaving the second parameter blank or specify another model identifier.

FAQ

Do I Need to Know How JSON Works to Use TASK_ROW_UPDATE?

No. You only need to provide a simple instruction; the add-on handles all JSON conversion and behindโ€‘theโ€‘scenes processing automatically.

Which Cell Should I Place the TASK_ROW_UPDATE Formula In?

Place the formula in any cell in the row you wish to update. The function automatically identifies the current row based on its location.

Can I Update Multiple Columns at Once?

Yes. Your prompt can include instructions to modify several columns. For example, โ€œset the Status column to Completed and update the Amount column to its current value multiplied by 1.1.โ€

What If I Want More Control Over the Changes?

TASK_ROW_UPDATE is designed for quick, in-row updates using natural language. For more complex modifications, consider using other functions like TASK_SHEET_UPDATE.

Iโ€™m Receiving an Error About the "model" Parameter. What Should I Do?

The model parameter is optional. Leave it blank to use your default language model, or specify a valid identifier in the format

"provider/model_name"

(e.g.,

"Gemini/gemini-1.5-pro"

).

Elisha

1 month ago

Categories
Features