choice: change list and update view?
[1/2] from: robert:muench:robertmuench at: 2-Feb-2002 11:21
Hi, after being able to specify a block of choices with data I have the next question: I have one choice field with some choices and depending on the user selection the list of entries for an other choice should be modified. Both choice are visible. Here is my snippet but this doesn't work: lab "Project" pr: choice 180 data get-project-id-list [ if project: get-project pr/text [ if all [not error? try [project/project-streams] project/project-streams] [st/data: project/project-streams st/update show st] ] ] return lab "Streams" st: choice 180 data  return -- Robert M. Münch IT & Management Freelancer Mobile: +49 (0)177 2452 802 Fax : +49 (0)721 8408 9112 Web : http://www.robertmuench.de
[2/2] from: sunandadh::aol::com at: 2-Feb-2002 6:22
> I have one choice field with some choices and depending on the user
> the list of entries for an other choice should be modified. Both choice are > visible.
Your code didn't work for me -- 'lab must be a personal word. But I think this code demonstrates what you are trying to do: unview/all view layout [ c1: choice data ["A" "B" "C"] c2: choice data ["Z" "Y" "X"] [if "Y" = first value [ c1/texts: ["N" "O" "P"] c1/text: first c1/texts show c1 ] ; if ] ; action ] ; layout It gets confusing because the choice button selections are in four places. My understanding is: /text -- the text actually displayed in the button ("B", say) /texts -- the full set of labels for the button ("A" "B" "C") /data - (a copy of the) /texts series positioned at the selected item ("B" C ) Value -- special word in action facet that is the same as /data (first value = "B") Sunanda.