Home > Community > Forums > Custom IC SKILL > Synchronize different string fields in UI form

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Synchronize different string fields in UI form 

Last post Tue, Mar 19 2013 9:23 PM by Andrew Beckett. 1 replies.
Started by Sandeep4386 18 Mar 2013 10:03 AM. Topic has 1 replies and 477 views
Page 1 of 1 (2 items)
Sort Posts:
  • Mon, Mar 18 2013 10:03 AM

    • Sandeep4386
    • Top 500 Contributor
    • Joined on Fri, Jul 20 2012
    • Tempe, AZ
    • Posts 25
    • Points 395
    Synchronize different string fields in UI form Reply

    Hi,

    I have created an UI form and it has four fields: lib, cell, view and path. I would like path filed to be updated immidiately when any of the other fileds (lib,cell,view) are  updated. e.g. if lib=mylib, cell=mycell and view=myview then I want path field to be updated as /mylib/mycell/myview. How do I syncrhonize these fields? any help would be appreciated.

     Regards,

    Sandeep 

    • Post Points: 20
  • Tue, Mar 19 2013 9:23 PM

    Re: Synchronize different string fields in UI form Reply

    Sandeep,

    A simple field callback will do this:

    procedure(CCFupdatePathField(form)
      form->path->value=strcat("/" form->lib->value "/" form->cell->value "/" form->view->value)
    )

    let((lib cell view path)
      lib=hiCreateStringField(?name 'lib ?prompt "Library" ?callback "CCFupdatePathField(hiGetCurrentForm())")
      cell=hiCreateStringField(?name 'cell ?prompt "Cell" ?callback "CCFupdatePathField(hiGetCurrentForm())")
      view=hiCreateStringField(?name 'view ?prompt "View" ?callback "CCFupdatePathField(hiGetCurrentForm())")
      path=hiCreateStringField(?name 'path ?prompt "Path")
      hiCreateAppForm(?name 'CCFexampleForm ?fields list(lib cell view path))
      hiDisplayForm(CCFexampleForm)
    )

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by Sandeep4386 at 18 Mar 2013 10:03 AM. Topic has 1 replies.