1 Reply Latest reply on Apr 13, 2011 9:27 AM by philmodjunk

    Selection of user list via popup menu

    PeterDowns

      Title

      Selection of user list via popup menu

      Post

      Hi,

      this is a problem I still can't resolve.

      I am trying to filter or view individual user details on a form layout via popup menu. Once the individual record is displayed I can edit their details. I have over 1000 users and I have an individual form with record selectors that works well and also list view of all the users that works well. But I need this selection version to work.

      I have a table called tblUsers it has a unique field called userID, plus a field called fullName which is a calculation field of firstname and lastName fields.

      I have made a layout form called networkAdmin_UserDetails

      I have duplicated (via relationships area) tblUsers to have 2nd copy tblUSers2

      1st Scenario

      (tblUsers attached to layout)

      all fields of table present on layout

      have a popup menu with value list containing tblUsers2 (userID (link field) and fullName) the field for the popup menu is linked to tblUsersID

      Popup menu displays 2 columns USerID and fullName correctly and when you select a name it only updates the userID field and none of the other fields. Also the 1st name that was default in the layout subsequently has a ? replacing the UserID field in the popup list. And it seems that it then want to save the 1st record. (message pops up)

      2nd Scenario

      (tblUsers2 attached to layout)

      all fields of table present on layout and are linked to tblUsers

      have a popup menu with value list containing tblUsers2 (userID (link field) and fullName) the field for the popup menu is linked to tblUsersID

      Popup menu displays 2 columns USerID and fullName correctly and when you select a name it updates the form perfectly. However the 1st name that was default in the layout subsequently has a ? replacing the UserID field in the popup list. And it seems that it then want to save the 1st record. (message pops up) If you select the default name which now has a ? in the ID field, or you get is blank field except for the userID field containing the ?.

      3rd Scenario

      Mimiced scenario 2 using a portal layout

      portal attached to tblUsers / layout and popup attached to tblusers2 

      Again records changed fine except for the ? issue

      So I have tried everything I can think of. I am new to this stuff so I am sure it is probably something simple.

      Thanks in advance

      Cheers

      Peter

        • 1. Re: Selection of user list via popup menu
          philmodjunk

          It sounds like you are using actions that modify the current record when you want to find a record instead.

          Define a global number field, gUserID. Put it on your layout and format it with your value list (and your value list can list values from tblUsers--no need for tblUsers2). Now, when you select a value in the value list, you are editing this global field's value, not the ID field of your current record so that it remains unchanged.

          Write this script:

          #Script should be run on tblUsers layout
          Enter Find Mode []
          Set Field [tblUsers::USerID ; tbleUsers::gUserID]  //this does not work unless global storage is specified for gUserID
          Perform Find []

          You can place a button next to the field to perform this script or you can set a script trigger on the global field to perform the script when the field is modified ( pop up menus ) or exited ( drop down lists ).

          If you are interested in some enhanced search tricks that can make finding one of your 1000+ users more easily, you might see if you can use one of the methods from this demo file: 

          http://www.4shared.com/file/plr_jbkk/EnhancedValueSelection.html