Sign in to Community
Sign in to view all badges
I'm trying to create a String field into my schema with default value set as "true".
I tried this :
<attribute default="true" label="Test Default Value" name="test" type="string" sqlDefault="Test"/>
But, it does not work
can you help me please ?
Hi abdelkarimg33790365 ,
I have tested your case, the solution is as follows
<attribute label="Test Default Value" type="string" name="sample_test1" sqlDefault="'test'" />
add the value test within ' ', so sqlDefault can be written as sqlDefault="' test'"
Thank you for your answer,
In the result I get the value 'true' I do not get the value in the sqlDefault attribute
Have you tested my syntax, if no then remove default property and only keep sqlDefault with your expected value in ''
yes i have tested your syntax, i remove the default property :
<attribute label="Test Default Value" length="350" name="testDefault" sqlDefault="test" type="string"/>
but in the form I do not see the default value I associated in the data schema
Please check the syntax. In Richa's suggestion, there is an extra ' character around "test". Which makes '"test"'.