Domingo Lupo • almost 3 years ago
Reference variables inside the AI block
Hello, I'm trying to get the AI prompt inside di Coda AI Block to read what's in an input text box in the same document, I tried with {name} and {{name}} but both give me an error: "I'm sorry, I cannot provide an answer without the specific input for {testText}. Please provide more information.".
I have assigned a name to the input text BTW.
Thanks!
Comments are closed.

3 comments
Katy Turner Manager • almost 3 years ago
Hi Domingo, is this what you had in mind? https://coda.io/d/_dD8_NcYSjDj/AI-block_suN4H
In the AI block prompt, you can @ reference a table or type = to open up the formula builder.
Happy to chat about this in office hours, too! https://calendly.com/coda-katy/office-hours-ai-at-work-challenge?month=2023-07
Domingo Lupo • almost 3 years ago
Hello, and Thanks!, unfortunately, what I need to do is to reference a value inside an input text, using the @ seems to not show the inputs as valid references: https://nimb.ws/2OE5gR
Katy Turner Manager • almost 3 years ago
Hi Domingo, you can right-click (control-select on a Mac) on the text control to give it a name. In the AI block prompt, you can type "=" to open up the formula builder, then type the name of the control.
I added more screenshots to that doc, and feel free to also ask any questions through support@coda.io or in the Coda Community! https://community.coda.io/