Help

Unable to insert true into a single select field which has options true and false

Topic Labels: Automations Base design Data
Solved
Jump to Solution
1633 6
cancel
Showing results for 
Search instead for 
Did you mean: 
JaponaisNaturel
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi everyone,

I am trying to insert in a single select field which has options "true" and "false" (without quotes) a data coming from an application through a webhook which is either "true" or "false" (also without quotes).

Unfortunately, when trying to do so, I get an error 422 "Cannot parse value for field blabla".

Is there an incompatibility between the values true and false and a single select field ?

Shall I add quotes in the original data so it can be inserted into a single select field ?

Thanks in advance for your help,

Gilles

2 Solutions

Accepted Solutions
Grunty
7 - App Architect
7 - App Architect

Values true and false refer to a boolean variable (ie, a checkbox).
Values "true" and "false" are strings, compatible with select field options.

It depends on how your code "sees" those values coming. How the source variable is described: string, or boolean/any/variant.
Looks like they are being interpreted as the latter; so yes, try enclosing the values in quotes, good chance they will get parsed out.

See Solution in Thread

JaponaisNaturel
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks for your reply !

I just found how to solve the problem based on your first reply and trial and error with Make.

When you want to map a data to a field in Make, you click on the field and then a list of tag representing the available data show up.

But as I explained, because the type of the data I wanted to map was incompatble with the type of a single select field this didn't work.

There is a "function mode" in Make where you can click on tags representing functions. So I clicked on the toString( ) tag and typed in the name of my data inside the parenthesis.

That was accepted by Make but didn't as I explained in a previous message.

To make it work, I had to also click on my data tag and not type it.

Now, the string conversion works and I do get true in my single select field if the data was true.

As for the permission to add new option, I didn't want that because the data was incorrect (e.g. "mydata" or "toString(mydata)").

Thanks again for your help and sorry it was finally more a Make problem than an Airtable problem.

See Solution in Thread

6 Replies 6
Grunty
7 - App Architect
7 - App Architect

Values true and false refer to a boolean variable (ie, a checkbox).
Values "true" and "false" are strings, compatible with select field options.

It depends on how your code "sees" those values coming. How the source variable is described: string, or boolean/any/variant.
Looks like they are being interpreted as the latter; so yes, try enclosing the values in quotes, good chance they will get parsed out.

Thanks for your reply !

I did it but unfornutalely what is passed to Airtable is "mydata" instead of the value (true or false) of mydata.

Airtable then asked for the permission to create a new option in the field which is not what I want.

I understand the problem comes from Integromat / Make which outputs "mydata" (without replacing the value of mydata by true or false). If I try ti use the function toString (mydata), then Make outputs everything as a string "toString (mydata)".

How did you guys manage to insert none string true / false values from Integromat / Make into an Airtable single select field ?

Grunty
7 - App Architect
7 - App Architect

I'm not familiar with Make, but let me point this out, just in case:

Many language syntaxis will code a function call with no spaces between the function name and the parenthesis enclosing the parameters.
Could it be that you actually inserted the space in: toString (mydata) in the definition of that field?
Shouldn't it be: toString(mydata) instead, for it to be recognised as a function rather than a string?

As for the permission to add new options, that can be solved by granting that permission at the field level. This is a once-for-ever configuration.

JaponaisNaturel
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks for your reply !

I just found how to solve the problem based on your first reply and trial and error with Make.

When you want to map a data to a field in Make, you click on the field and then a list of tag representing the available data show up.

But as I explained, because the type of the data I wanted to map was incompatble with the type of a single select field this didn't work.

There is a "function mode" in Make where you can click on tags representing functions. So I clicked on the toString( ) tag and typed in the name of my data inside the parenthesis.

That was accepted by Make but didn't as I explained in a previous message.

To make it work, I had to also click on my data tag and not type it.

Now, the string conversion works and I do get true in my single select field if the data was true.

As for the permission to add new option, I didn't want that because the data was incorrect (e.g. "mydata" or "toString(mydata)").

Thanks again for your help and sorry it was finally more a Make problem than an Airtable problem.


@JaponaisNaturel wrote:

Thanks again for your help and sorry it was finally more a Make problem than an Airtable problem.


Thanks for your explanation, I too learned something new today.

And nothing to sorry about - Airtable and Make form what kids 😉 like to call "an ecosystem". Either part fails, the whole thing fails.