5 Replies Latest reply on Jun 6, 2014 8:31 PM by philmodjunk

    How to tie database to one device?

    vtdonn

      Title

      How to tie database to one device?

      Post


           I've heard that you can write something that will enable a database to only be used on a single device, perhaps by using UEID code or something like that. Could someone enlighten me? We sell a database that we don't want shared between devices.

        • 1. Re: How to tie database to one device?
          philmodjunk

               Take a look at the Get ( PersistentID ) function. It's not perfect when used in FM GO on iOS devices but this is probably what you heard about.

          • 2. Re: How to tie database to one device?
            vtdonn

                 Okay, i must be blind, but where is that function located? I'm not seeing anything like that in the script menu, or do i build a custom function? If so, how do I trigger the custom function to run?

                  

                 Also, when you say its not perfect, what limitations are there?

                  

                 Thanks

            • 3. Re: How to tie database to one device?
              philmodjunk

                   It's not a script step it's a function. Look up the get function in FileMaker help to learn more.

                   Recent iOS and FM GO updates have changed what value is returned when used in FM GO. With those changes, when you re-install FM GO, you get a new value returned by this function. Thus the function returns a value specific to the device, but if the user re-installs, they'll need some customer support to "re-register" their device in order for it to work with the new value returned by this function.

              • 4. Re: How to tie database to one device?
                vtdonn

                     Thanks, that is all pretty simple. The next question is, can you tie a database to multiple devices? I can't figure out the logic statement to make this happen. Once I have the PersistentID variable set and assign that value to a field "X", I can say that if "X" doesn't equal the appropriate PersistentID, Exit Application.

                     But I want to say if "X" doesn't equal ONE of four or five PersistentIDs, I cannot figure out the language.  Any ideas?

                • 5. Re: How to tie database to one device?
                  philmodjunk

                       All you need is a table of records with each record storing a persistent ID. Put the current device's persistent ID into a match field linked to this table and either you have a matching record or you do not.

                       You might have these relaitonships, but using your table and field names in place of mine:

                       SearchTable::cPersistentID = DeviceIDs::PersistentID

                       Base your layout on SearchTable. Define cPersistentID as an unstored calculation field with Get ( PersistentID ) as its expression.

                       Then Not IsEmpty ( DeviceIDs::persistentID ) will be true only if the current device's persistent ID is stored in the PersistentID field of a record in DevicedID's