Announcement

Collapse
No announcement yet.

Search master detail table

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Search master detail table

    Hi,

    I have master detail tables,

    company.db
    company_code
    company_name

    branch.db
    company_code
    branch_code
    branch_name

    ie
    companyA have branchA1 and branchA2
    companyB have branchB1 and branchB2

    Assuming I want to multi select Company A & company B
    And then i also want to multi select branchA1 and branchB2 only.

    How can i do it in script case ?

    Thank's for helping

  • #2
    If you have done a multiselect the items are stored in a single field using a separator. If you create an ajax event on this field you can explode the values and generate a string to be used in the second lookup with the 'in' statement. I.e. you create a string 'b1, b2' and assign it to a global [my_in]. In the next sql statement of your new field you apply the sql where ... in [my_in];

    a bit cryptic, but I hope this helps.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Still decoding your reply, but i think i know what you mean.

      Thank you so much for your help

      Originally posted by aducom View Post
      If you have done a multiselect the items are stored in a single field using a separator. If you create an ajax event on this field you can explode the values and generate a string to be used in the second lookup with the 'in' statement. I.e. you create a string 'b1, b2' and assign it to a global [my_in]. In the next sql statement of your new field you apply the sql where ... in [my_in];

      a bit cryptic, but I hope this helps.

      Comment

      Working...
      X