1 Reply Latest reply on Sep 9, 2014 12:07 PM by philmodjunk

    Values for individual web direct users

    hrcap

      Title

      Values for individual web direct users

      Post

      Evening All

       

      Thanks in advance for any input.

       

       I have a list view, each row in the list represents a separate document. One of the fields on the list view is 'select document' this is a check box. A user can scroll down the documents and select the documents that he wants and then he can save them to his computer.

       

      The system is live over Webdirect, my problem is:

       

      If two users are selecting documents at the same time then the selections of user 1 will appear on the selections list of user 2 and vice versa.

       

      Is there any way of 'unsharing' the 'select document' field so any selections made are local to that user instead of being shared over web direct.

       

      I hope this makes sense.

       

      Many Thanks

       

      Hadleigh

        • 1. Re: Values for individual web direct users
          philmodjunk

          Instead of setting values in a field in your documents table--which then affects all users accessing the documents table. Build a return separated list of values in a global field or variable. Since the values in the global field or variable will be specific to each user, their choices won't interfere with each other. Conditional formatting or a "hide object when" setting on a layout object can show which document is selected for a current user.

          The script to add/remove a document from such a list can look like this:

          IF [ IsEmpty (FilterValues ( $$SelectedList ; Documents::__pkDocumentID ) ) // Document is not yet selected, select it ]
              Set Variable [$$SelectedList ; value: List ( $$SelectedList ; Documents::__pkDocumentID ) ]
          Else
              #Document is already selected, de-select it
              Set Variable [$$SelectedList ; Value: Substitute ( ¶ & $$SelectedList & ¶ ; ¶ & Documents::__pkDocumentID & ¶ ; ¶ ) ]
              #Keep excess ¶ characters from "building up" in this variable
              Set Variable [$$SelectedList ; Value: Middle ( $$SelectedList ; 2 ; Length ( $$SelectedList ) - 2 ) ]
          End If

          This technique is adapted from an example to be found in "Adventures In FileMaking #2" (forthcoming in a day or two) where it is used to implement a "check box field with a scroll bar".

          Caulkins Consulting, Home of Adventures In FileMaking