Default values? [Feb 05]

:person_tipping_hand: o1lab replied

I’m on mobile so I’m unable to confirm exactly

:raising_hand_man: Shard replied

Ok, I’ll mention both :+1: thanks for your time

:person_tipping_hand: o1lab replied

Thanks for your patience, will have a fix in upcoming release

:raising_hand_man: wkw replied

Hi Shard@discord. The default values are assigned to columns when they are not specified. They won’t show in UI when you create a new row nor a form view.

System fields are disabled in Form View on purpose.

:raising_hand_man: wkw replied

for the “Option” field even though the type of it is text, I can only use integers as Default value.

I believe you missed the single quote

:raising_hand_man: Shard replied

Do you mean that I need to hide the field from the form so it gets the default value?

:raising_hand_man: Shard replied

And for the option field if I want to set a default text value I need to write it like this: “blabla” ?

:raising_hand_man: wkw replied

e.g. ‘blablabla’

:raising_hand_man: wkw replied

you don’t need to hide anything. Default value means if the column takes this value if it s not present.

:raising_hand_man: wkw replied

For example, if i hv a column called ‘colA’ with default value ‘abcde’ and a column called ‘colB’.

Let’s say i input colB with sth, when i submit the form, it ll triggere the API to insert the data to db. the db sees there is no value for colA, then it ll feed the default value there

:raising_hand_man: wkw replied

so when u go back to the grid view, u should be able to see the default value ‘abcde’ in colA

:raising_hand_man: wkw replied

another case is I input something to ‘colA’, says ‘xyz’. the db sees there s a value for colA, so it would take it. when u go back to the grid view, u should see ‘xyz’ instead of the default value ‘abcde’

:raising_hand_man: Shard replied

Ok, I understand it now. Thanks :+1:

Autogenerated from discord


Join NocoDB’s community

DiscordTwitterRedditDocs