Mutation: create_column for a 'formula' type column

I’m trying to use create_column to create a column of the ‘formula’ type, but the schema on the GraphiQL tool doesn’t appear to list this as a valid value for the column_type variable, which as far as I can see should be a ColumnType. Can anyone let me know if this is possible?

Querying for a board created through the normal user interface does seem to show ‘formula’ as the type. Is ‘formula’ maybe some special case of one of the listed types?

{
  "data": {
    "boards": [
      {
        "columns": [
          {
            "id": "name",
            "type": "name"
          },
          ...
          {
            "id": "formula3",
            "type": "formula"
          }
        ]
      }
    ]
  }
}

Many thanks in advance!

Hey @lucy.parry,
The formula type is not supported yet by the API. The reason for that is that this column requires special settings to work and we did not yet created the ability to set column settings with the API.
Without the settings the formula column is not usable (the formula itself is saved in the column settings).
We are working on it and hope we can get this ready soon :slight_smile:

Hi @Ayelet,
Thanks for the response! Will look forward to being able to create the column settings when this feature is available in that case :slightly_smiling_face:

2 Likes

Any update on enabling the Formula column type?

1 Like

Hey there @amit.lzkpa :wave:

I’m afraid that I do not have any good news for you at this point in time - the Formula column is still not accessible through our API as of now. I definitely understand how this would be a very relevant feature to have, and I really wish I could shed more light here, but I’m not able to provide an ETA just yet on when this would be supported.

Alex

Hi Alex
Thanks for the reply.
That’s fine. I have a few ideas for how I can work around that limitation (however I’d be more comfortable with that as properly integrated feature).
With regards to the ongoing hackathon, can you provide some clarification how such workarounds would be evaluated?
Amit

2 Likes

@AlexSavchuk & @dipro - The formula reference page all looks a lot like Excel formula format. Is that what they are or is it a custom formula script language only used by monday.com? We’re wondering if we can pull the formula settings out via the API, parse them and execute them as Excel to get the same result inside our app.

Hey everyone! Just wanted to follow up on this – @PolishedGeek is right!

While our API does not support reading the calculated value of a formula column, you can use the settings_str field to get the config of the formula column.

This config contains the raw formula. Since the formula is almost identical to the Excel syntax, you should be able to pipe this into a formula parser of your choice.

Here’s a simple example of the process:

  1. Get all the column values from the board
  2. Get the formula in a given formula column
  3. Replace the references to {columns} with the values of the column
  4. Calculate the formula result

I don’t have specific example code for this workaround, but I wanted to chip in and validate @PolishedGeek’s suggestion!

5 Likes

This is what we do with our “perform existing formula and cast result to column” recipe in General Caster app.