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

Old December 31st, 2019, 09:12 AM
This is my code for a chooser-table to pick Specialties that match a given entry's tags. I thought I understood needtag, but apparently not. The skill choice has a tag of Skill.skMech (which refers to the Mechanic skill) and no other Skill tags. There are three specialties that have the Skill.skMech. And yet, when I bring up the chooser table, it has all of the specialties. I thought that, with useHero not being set, it would look for all Specialities that match the skill choice thing.

Code:
<portal
  id="specChoose"
  style="chsNormal">
  <chooser_table
    component="Specialty"
    choosetemplate="LargeItem"
    choosepicks="thing"
    >
    <needtag container="Skill" thing="Skill"/>
    <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>
Am I missing something obvious? Or is there a good way to debug why this is happening?
Duggan is offline   #1 Reply With Quote