Announcement

Collapse
No announcement yet.

Load multiple fields problem.

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

  • Load multiple fields problem.

    Hello.
    I have two tables, one for catogery, the other for items related to the category.
    i created a new form application and make the category field [select] as drop down menu, if i chose any option from drop down menu i want to load it's related fields from the items table all at once, not one by one.
    Table two [items] has two columns, one for item [text box] and the other for text value already inserted before.

    another question, i want to view full name in Grid instead of [first name, Last name], i did it in the form but i do not know how to make it in the grid.

    any ideas?
    Scriptcase V8.1 Enterprise Edition.

  • #2
    another question, i want to view full name in Grid instead of [first name, Last name], i did it in the form but i do not know how to make it in the grid.
    Scriptcase V8.1 Enterprise Edition.

    Comment


    • #3
      Create a custom field. Remove the fields you don't want to see on the grid, outside of the grid (don't remove them from the sql). Next in the onrecord event you can set your new field. Suppose it's {forename} and {sirname} and you want to show this as one field and created {combinedname} your onrecord event would be:

      {combinedname}={forename}.' '.{sirname};
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #4
        Thanks Albert.

        I tried another method and it works, I created a field {Customer ID} and i used this SQL select statement in the grid lookup [Automatic]:

        SELECT customer_id, sc_concat(first_name, ' ', last_name)
        FROM customer
        ORDER BY first_name, last_name

        Problem two fixed. but I am still stuck in problem one

        I have a lab test called CBC it contains approximately eight items need to be loaded all at one in order to enter the test result.
        same thing for more that ten tests, every one contains multiple fields. what is the best way to make this happen?

        Thanks a lot.
        Last edited by iiiax; 03-31-2014, 01:08 AM.
        Scriptcase V8.1 Enterprise Edition.

        Comment


        • #5
          Sorry, I don't get your problem. Do you need to enter eight items and then do something? Or do you need to load the items first and then allow to enter some data? In the onload event you can do all you need before display.
          Albert Drent
          aducom software netherlands
          scriptcase partner, reseller, support and (turn-key) development
          www.scriptcase.eu / www.scriptcase.nl

          Comment


          • #6
            Thanks a lot Albert.
            Assume that i have a drop down menu for a category, for example if i chose CBC from this drop down i want to load a form that contains many fields.
            Scriptcase V8.1 Enterprise Edition.

            Comment


            • #7
              Then create an onchange event on that drop down field. In the event you test the value and call sc_redir to the form you need.
              Albert Drent
              aducom software netherlands
              scriptcase partner, reseller, support and (turn-key) development
              www.scriptcase.eu / www.scriptcase.nl

              Comment


              • #8
                Thank you so much Albert. appreciate your help
                Scriptcase V8.1 Enterprise Edition.

                Comment

                Working...
                X