Cannot Use the words "yes' or 'No' in the value lists

A place for users and developers of the Xataface to discuss and receive support.

Cannot Use the words "yes' or 'No' in the value lists

Postby nalaka » Wed Dec 19, 2007 7:12 am

I ma trying to use 'yes' and 'no' words in valuelists as follows;

[YesNo]
Y = Yes
N = No

But the forms does not disply the required words. If I use some other word other than 'yes' or 'no' , it displays those words in the form.

Is this a limitaiton on Dataface ? I think that these words are most usefull in common data entry and these are 'must' kind of words.
Is there ny workaround for this problem ?
Nk
nalaka
 
Posts: 1
Joined: Wed Dec 19, 2007 7:05 am
Location: Sri Lanka

Postby shannah » Wed Dec 19, 2007 12:36 pm

From: http://ca.php.net/parse_ini_file
Note: There are reserved words which must not be used as keys for ini files. These include: null, yes, no, true, and false. Values null, no and false results in "", yes and true results in "1". Characters {}|&~![()" must not be used anywhere in the key and have a special meaning in the value.


Since Dataface uses INI files and the php parse_ini_file function to parse them, it is subject to these constraints.

Workarounds include:
1. Storing the valuelist in the database.
2. Defining the valuelist in the delegate class.
3. Using an alternative notation:
e.g.
Code: Select all

[YesNo]
Y=Y
N=N

or
Code: Select all
[YesNo]
Y="Yes."
N="No."


And a clever person can probably come up with something even better. You can try even just wrapping "yes" in quotes
e.g.
Y="Yes"
and see if that works.. not sure if it will.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 23 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved