• 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. Dynamically update a form

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 14579
  • 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

Dynamically update a form

thomas1000
thomas1000 over 12 years ago

I am trying to dynamically update a form so that when you enter text into one text box other things on the form, like other text boxes change.  This is such a common thing to want to do it seems like it ought to be easy but for some reason I haven't found the solution  I tried things like 

set(car(TheForm->fieldList) "Test")

Here TheForm was a variable set to the form ID.  I got the field list because in my form I have a variable number of fields and don't necessarily know the ID of each field.  In this example I was just trying to set the first text box field on the form to "Test".  That didn't work - the CIW echoed "Test" but the form didn't update.

Can anyone help show me how to update a form dynamically so that when one text field is changed by the user, another text field has its value changed?

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    You'd need to do:

    get(TheForm car(TheForm->fieldList))->value="Test"

    If you just do car(TheForm->fieldList), you'll get the symbol which is the name of the field. What you were doing was setting a property on the symbol, not on the form field. So what I'm doing is getting the the form field structure itself, and then updating the value.

    Note I would generally recommend against using fieldList - that's all very well until you then add a button or something else onto the form. Better would be to ensure that your fields are named deterministically by using something like concat('CLfieldThing count++) rather than gensym, and then record the number of fields on the form using TheForm->myFieldCount=count, or  record the fields that you generate using TheForm->myFields=listOfFields. Note you can add whatever properties you like on the form data structure, so it's useful to store related information.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • thomas1000
    thomas1000 over 12 years ago

    Thanks, Andrew,

    That works well.  A very helpful response.

    • 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