Hello ,
is it possible to remove whitespace beginning and end for the “Ref” column,
without making a new one with a formula ?
I mean, once I finish typing, apply the “strip” function on the current column.
Yes, it’s possible! See Trigger Formulas, and scroll down to example 1. In short, the steps are:
- Set Column Behavior to
Data Column
- Set Trigger Formula to
value.strip()
- Click Apply on changes to, and select
Current field
Now whenever you type a new value, or change an existing value, in this column, the value you enter would get stripped of whitespace automatically.
Thanks @dmitry-grist
I have questions :
- is there a way to apply on all the current existing rows that formula in Column Behavior and not only the new becoming rows or updates
- If I add a new row thru the API, does the formula will be be apply ?
- is there a way to apply on all the current existing rows that formula in Column Behavior and not only the new becoming rows or updates
A fairly simple option is to select the column, press Ctrl-C (Cmd-C on Mac)
to copy the values to the clipboard, then Delete
to clear the column, then Ctrl-V (Cmd-V on Mac)
to paste the copied values back over the column. At the last step, the formula will apply because the cells are being updated.
Alternatively, you can apply a formula to all values in a column using the somewhat neglected functionality of Column Transforms described here: Transformations - Grist Help Center (available at the bottom of the Column options in the creator panel).
- If I add a new row thru the API, does the formula will be be apply ?
Yes, I believe it would.