4 Replies Latest reply on Jan 13, 2011 10:51 AM by philmodjunk

    Getting drop-down list to show selected item from Value List instead of field

    TimKing

      Title

      Getting drop-down list to show selected item from Value List instead of field

      Post

      I have a Job form where we select the client from a drop down list. The list is keyed on ClientID but displays only Client Name.

      Once the correct client is selected, the rest of the fields are auto-populated fine, except the Client Name field shows a number, the AutoIndexed ClientID field.

      Is there any way to make it so that the field in the database still contains ClientID, yet when the form is displayed the field shows client name?

        • 1. Re: Getting drop-down list to show selected item from Value List instead of field
          Abhaya

          hello,

           If job form display the client deails then...............

          1>Make a relation with job and client.

          2> Now  you'r in job layout,so make the client field(in job layout)  to a dropdown list that contins the value from client table.

          3>Insert records into the client table.

          4>In job layout set a trigger with the field client name that is on object save with a script.

          5>The script may call client layout or search all the field values from client and paste in job layout in corresponding field.

          I think this'll help u.....

          • 2. Re: Getting drop-down list to show selected item from Value List instead of field
            philmodjunk

            Two options:

            1) Change the settings for this field from drop down list to Pop up menu. Now you'll see the name displayed instead of the number. If you don't like the look of the pop up menu, you can specify a 0 line width or transparent pen pattern for this field and then put a rectangle around if if you want a border.

            2) Add the name field from the related table to your layout. If your drop down list uses the Arrow option, you can even resize the ID field down to just the width of the arrow and stick it next to the name field so that it looks like one field.

            • 3. Re: Getting drop-down list to show selected item from Value List instead of field
              TimKing

              Thanks for your responses.

              I ended up using PhilModJunk's second suggestion. While the first one worked, for a large number of values in the selection list the lack of a scroll bar made it difficult to navigate quickly.

              Abhaya Behera: I gave your suggestion a go as well. I didn't fully understand your instructions, however I was able to create a trigger which updated the field's value to the Client's name. The only problem was that as soon it updated the rest of the client details (phone, email etc) went blank, presumably because there is no row in the table with ClientID = 'Joe Bloggs'.

              • 4. Re: Getting drop-down list to show selected item from Value List instead of field
                philmodjunk

                ...for a large number of values in the selection list...

                Regardless of whether you use Options 1 or 2, sometimes you can use a conditional value list to reduce the number of values displayed to just those that are relevant to the current record.