Default attribut

Avatar

Avatar
Validate 1
Level 2
abdelkarimg3379
Level 2

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
abdelkarimg3379
Level 2

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
abdelkarimg3379
Level 2

20-04-2018

Hello,

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 ?

Replies

Avatar

Avatar
Validate 10
Level 4
richac96395021
Level 4

Likes

32 likes

Total Posts

86 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 10
Level 4
richac96395021
Level 4

Likes

32 likes

Total Posts

86 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile
richac96395021
Level 4

20-04-2018

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'"

with regards,

Richa Chaubey

Avatar

Avatar
Validate 1
Level 2
abdelkarimg3379
Level 2

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
abdelkarimg3379
Level 2

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
abdelkarimg3379
Level 2

20-04-2018

Hi richac

Thank you for your answer,

In the result I get the value 'true' I do not get the value in the sqlDefault attribute

cordially

Abdel

Avatar

Avatar
Validate 10
Level 4
richac96395021
Level 4

Likes

32 likes

Total Posts

86 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 10
Level 4
richac96395021
Level 4

Likes

32 likes

Total Posts

86 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile
richac96395021
Level 4

20-04-2018

Have you tested my syntax, if no then remove default property and only keep sqlDefault with your expected value in ''

Avatar

Avatar
Validate 1
Level 2
abdelkarimg3379
Level 2

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
abdelkarimg3379
Level 2

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
abdelkarimg3379
Level 2

23-04-2018

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

Avatar

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile
florentlb
Level 10

15-05-2018

Hi,

Please check the syntax. In Richa's suggestion, there is an extra ' character around "test". Which makes '"test"'.

Florent