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

Old September 20th, 2017, 05:25 PM
Currently, the following code works in the Skill Component, but seems slightly wasteful:

Code:
<!-- Set the value for whether to display the specialty button -->
<eval index="5" phase="Setup" priority="10000"><![CDATA[
  var myId as string
  myId = tagids[Skill.sk?," & "]
  
  var specMatch as number
  specMatch = 0
  foreach thing in Specialty where myId
    specMatch += 1
    nexteach
  debug "specMatch: " & specMatch
  
  if (specMatch <> 0) then
    if (field[trtUser].value > 0) then
      perform assign[Helper.AllowSpec]
      endif
      
    if (tagis[Specialty.?] <> 0) then
      perform assign[Helper.AllowSpec]
      endif
    endif
  ]]></eval>
Duggan is offline   #9 Reply With Quote