Generate Formulas using AI

Use natural language prompts to generate formulas with NocoAI.

This feature is available only on NocoDB Cloud. It is not supported in self-hosted or on-premise deployments.

Overview

Writing formulas can be complex and time-consuming. With NocoAI, you can now describe the logic you need in plain English, and have a formula generated for you automatically.

This is perfect for non-technical users, power users who want to speed up formula creation, or anyone looking to avoid syntax errors.


Steps to Generate Formulas Using AI

  1. Add a Formula Field

    In your table, add field and select Formula as the type.

  2. Click Formula Helper

    Inside the formula editor, click ✨ Formula Helper to open the prompt-based generation interface.

  3. Describe the Logic in Natural Language

    Write a simple prompt explaining what the formula should do. Example:

    Show "✅ Done" if Status is "Completed", else show "⏳ In Progress".

  4. Review and click Generate

    NocoAI will generate the formula based on your prompt in the formula editor. You can review and modify if needed.

  5. Click Save

    Once you're happy with the result, save the field.

Formula field using AI - Step 1Formula field using AI - Step 2

Tips for Better Formula Suggestions

  • Be precise in your prompt

    Mention exact field names and values where possible. Example:

    Calculate number of days between Start Date and End Date.

  • Use conditional phrases

    Help the AI understand intent. Example:

    If Priority is "High" and Status is not "Completed", show "⚠️ Urgent".

  • Refer to data types clearly

    Indicate if you’re working with dates, numbers, checkboxes, or text. Example:

    Add 7 days to the Created Date.


Example Prompts and Outcomes

PromptResulting Formula (Example)
If Status is "Done", show "✅", else show "⏳"IF({Status} = "Done", "✅", "⏳")
Show the number of days between Start and End DateDATETIME_DIFF({End Date}, {Start Date}, "days")
If Due Date is past today, mark as "Overdue"IF({Due Date} < TODAY(), "Overdue", "")
Combine First Name and Last Name into one fieldCONCAT({First Name}, " ", {Last Name})

What’s Next

Once your formula field is ready, you can:

NocoAI simplifies complex logic so you can stay focused on building great workflows!