View Single Post
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,444

Old December 13th, 2017, 06:40 AM
I am replacing a menu_things with a chooser_table to leverage the choice actually being added as a pick (specifically, I want a particular character Background to allow the choice of a Skill Specialty). Previously, I used "candidatefield" on the menu_things to make it easy to build a list of choices to be stored in a field, something like "component.Specialty & (Specialty.spEngArch | Specialty.spEngVeh)" to restrict the choice to either the Architecture or Vehicle specialty of Engineering.

When I try to use that, I get a message saying that candidatepick has to be specified as well. Looking at the code examples I have where that is used, it always seems to be tied to a gizmo. Is there a way to tell it to just look at a field on the UserSelect? Or is there a way to tell the candidate child element to draw its contents from a field?

Code:
<portal
  id="specChoose"
  style="chsNormal">
  <chooser_table
    component="Specialty"
    choosetemplate="SpecPick3"
    candidatefield="userCandid2">
    <chosen><![CDATA[
      if (@ispick = 0) then
        @text = "{text clrwarning}Select Specialty"
      else
        @text = field[name].text
        endif
      ]]></chosen>
    <titlebar><![CDATA[
      @text = "Choose a specialty"
      ]]></titlebar>
    </chooser_table>
  </portal>
Duggan is offline   #1 Reply With Quote