• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Retrieve data selected from checkboxes

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 13364
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Retrieve data selected from checkboxes

alan6
alan6 over 10 years ago

Hi,

 

I am looking to retrieve data selected from checkboxes in below code.

When user selects multiple checkbox’s that are displayed by hiCreateToggleField, How can I retrieve the selected checkbox data?

Can you please provide an example.

 Thanks!

names = '("Dan" "Jim" "Joe" "Tim")

listN = '("Names")

choices=foreach(mapcar elem names list(stringToSymbol(elem) elem))

 

mytoggle = hiCreateToggleField(

?name 'toppings

?prompt "Names"

?choices choices

?itemsPerRow 1

); end hiCreateToggleField

 

TabField = hiCreateTabField(

?name 'TabField

?pageScroller nil

?fields list(

list(

list( mytoggle 5:10 230:50 55 )

)

)

?tabPlacement 'top

?callback 'SampleTabFieldCB

?tabs listN

);end hiCreateTabField

 

 

TabFieldForm = hiCreateAppForm(

?name 'TabFieldForm

?formTitle "Tab Field Form"

?fields list( list( TabField 10:10 500:535 ))

?buttonLayout 'OKCancelApply

?formType 'nonOptions

;?unmapAfterCBt

?initialSize t

);end hiCreateAppForm

hiDisplayForm(TabFieldForm)

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    If you do:

    TabFieldForm->TabField->page_Names->toppings->value

    you'll get:

    (nil t t nil)

    (I had Jim and Joe checked).

    You could get the names of the boxes selected by doing:

    selected=foreach(mapcan (name value) names TabFieldForm->TabField->page_Names->toppings->value
      when(value list(name))
    )

    This would return:

    ("Jim" "Joe")

    The foreach mapcan works by iterating over the list of names and the list of boolean values, and then retuning the name only if the checkbox was selected.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information