1 (edited by caylea1 2014-07-23 22:25:40)

Topic: Multi 'Yes/no' on one form and one table?

Hello,

I trying to figure it out how to make many that same combos with only YES and NO and I DONT KNOW values?

F.e.

Questions:

Question 1: combo (with Yes, no, I dont know)
Question 2: combo...
ect.

If I want to manage it only with one table (or two, second is a choicetable with 2 values YES, NO) I can't make in that way:

questiontable
questiontable.question
id_choice [choicetable]

because I can't put more than one: id_choice [choicetable] - reference?

So any ideas?

Post's attachments

Attachment icon questions.png 29 kb, 325 downloads since 2014-07-24 

Re: Multi 'Yes/no' on one form and one table?

Hello,


Why you can't put more that one id_choice? (It was impossible in the old version)
You can create many references to choicetable, will look like:
id_choice
id_choice1
id_choice2



also you can use field type BOOLEAN, this type can have three states: Yes, No, Unknown.
For this type of field you can't use ComboBox, you should use CheckBox, to activate the possibility set an unknown state, set property of CheckBox "AllowGrayed" to True.

Dmitry.

Re: Multi 'Yes/no' on one form and one table?

Yes, I use fields with boolean but I want to replace it with many references, because of 'yes, no,  unknown' valuses in grid which are english and all other things are in different language so it's kind of not good.
But thanks for references advice, as one can see questions.png (attachement) it's working but I don't know how to show choice names in grid instead of id's. I can add choice.name but it just show first id_choice field.

Is there some easy way to do that? It would be very helpfull to have that solution

Re: Multi 'Yes/no' on one form and one table?

You should create two Calculated Field in table "questions" for this:
1

(SELECT choice.name FROM choice WHERE choice.id = id_choice1)

2

(SELECT choice.name FROM choice WHERE choice.id = id_choice2)

Then you can add these calculated fields to the TableGrid

Dmitry.

Re: Multi 'Yes/no' on one form and one table?

THANKS!

That is what I needed.

Re: Multi 'Yes/no' on one form and one table?

I've noticed that I can add only 10 references:

id_name
id_name1
...
id_name9


id_name10 chosen in properties of object has no fieldname to choose.

Should be more than 10?

Re: Multi 'Yes/no' on one form and one table?

caylea1
Thanks, you find bug, fixed.


Please, download again:
http://myvisualdatabase.com/download/myvisualdb.exe

Dmitry.