Format Decimal Places of a figure using Format Data in Table Grid

Hello,

Is it possible to restrict the no of decimal places in a figure using format data of the Table grid Option. Like the FLOOR() or CEILING() functions.

Regards
Yash

@yash1

If you are using Connectors then you can use Transform Keys option in your connectors and use a FLOOR function instead to limit upto 2 decimal.

For example - your have a decimal value in connector result called distance, then you can Add a Key to use a New Key with FLOOR function and use this new key instead in your tablegrid BindData formula.

FLOOR(OUTPUT.result.rows.distance,0.01)

Hope this helps!

Can you please share the custom function formula for this !

@yash1 This is the formula used in transform keys which is given to Key name - Decimal.

Below is the BINDAPI custom formula - (This can also be added visually from Data > Connectors)

BINDAPI( [GetAuthorListByPaging.result.rows.name, GetAuthorListByPaging.result.rows.initials, GetAuthorListByPaging.result.rows.last_name, GetAuthorListByPaging.result.rows.author_id, GetAuthorListByPaging.Decimal])

Hi,

  1. When I add the TransformKey the tablegrid control doesnt display anything.
    Upon Rt Click-> Inspect ,I noticed an error on the console.

Looks like a format error. I checked the Json and the key that I am trying to FLOOR() has a numeric value.

.

Haven’t been able to try the transform key. a followup question,

  1. My BIND API function there is MAPKEYS used on the fields.

MAPKEYS( BINDAPI( [fullrecords.records.fields]) , “ID Exploitations:ID Exploitations,:tractor: [Statut]::tractor: [Statut],:battery: [surface]::battery: [surface],:battery: [nb ilôts]::battery: [nb ilôts],Surface totale en îlot:Surface totale en îlot,Nombre d’ilôts:Nombre d’ilôts,Nombre d’ilôts à finir:Nombre d’ilôts à finir,Adresse:Adresse,Ville:Ville,Tel Fixe:Tel Fixe,Tel Portable:Tel Portable,Email:Email,RECORD_ID_EXPLOITATION:RECORD_ID_EXPLOITATION”)

Wondering How to fit in the transform key (decimal) in such a query?

@yash1

Looks like you are using a Custom Airtable Connector. I would suggest instead of using -

BINDAPI( [fullrecords.records.fields])

you bind individual keys, like -

BINDAPI( [fullrecords.records.fields.ID Exploitations,fullrecords.records.fields.:Surface totale en îlot,fullrecords.Decimal])

Feel free to Add other keys you need in above formula.

Also, I would suggest to remove other keys from Transform keys - Record_id, recoff, email just to be sure that it isn’t interferring with Decimal key.

Do let us know if this works or still facing the issue?

Hope this Helps!

Hey Fenil,

I tried the option you suggested.
added a decimal transform key.

But that is causing NO display on the TableGrid Control.

I checked the response of the api call. we are getting the correct json as response.

apiresp