1 Reply Latest reply on Aug 21, 2014 5:52 AM by philmodjunk

    list in field is not user specific

    d.vanlooij

      Title

      list in field is not user specific

      Post


           Hi,

           I have a problem with a new database I am building.
           The database consists of 1 data table (= OEE_yearly), 1 user table and a layout with charts(xmcharts plugin).

           For the plugin on the layout I need a list of a selection of the data in the data table based on the user. (userid is included in the datatable as a field). I build a calculation field in the user table which states:

           =List(OEE_yearly::OEE%) and OEE_yearly::User = $$Currentuser

           $$Currentuser is generated on login on database

           However when I do this it doesn't work. I only get the number 1 back and not a list in this field.

           When I eliminate the part : " and OEE_yearly::User = $$Currentuser " in the calculation then the list is generated but with all the data in the table.

           How can I fix this?

        • 1. Re: list in field is not user specific
          philmodjunk

               List(OEE_yearly::OEE%) and OEE_yearly::User = $$Currentuser

               Is a Boolean expression if the expression to the left is not empty and the value in the User field matches the value of the Variable, it returns True which in FileMaker is returned as a 1. (1 = True, 0 = False)

               What is your relationship between your two tables? If you have a field for the current user included as a match field in your relationship so that the relationship matches to only records for the current user, the List function alone as you have tried should return a list of values only for the current user.

               If using FileMaker 12 or newer, you also have the option of replacing List with ExecuteSQL and then you can specify the User as part of the SQL query you'd set up as a parameter of that function.