1 2 Previous Next 15 Replies Latest reply on Nov 7, 2012 2:10 PM by philmodjunk

    Sending New Record/Data to another Filemaker Account



      Sending New Record/Data to another Filemaker Account


           Hi I am working with a filemaker project that let's one user input text in set of fields and one of the field will be a "reffered to" which user can select user account that the record/data will be send to after commiting or pressing a submit button. The other user whom the record or data were reffered will then login to the database and will received a notification or the new record/data for action. (this should be in list view cos one user can be reffered with many record/data for action.)

           Can anyone please help me on how to do this. Im new to filemaker and I havent found a solution yet to my problem

           I will be so thankful to anyone who will help me.


           Im using filemaker pro 12 advanced.


        • 1. Re: Sending New Record/Data to another Filemaker Account

               The only data an Account can store is an account name, privilege set and password. So you can't send data to an account. But you can log this data in a record with the selected user's account name entered in a field in this table. A script can then be set to run each time the file is opened that uses the current user's account name to look for any entries in this table that haven't already been brought up for the user's attention in a previous run of this script.

               Let's say the table where this data in entered is called "Encoded" and contains a field called __pkEncodedDataID and is an auto-entered serial number field that uniquely identifies this record.

               Then a "Referrals" table can have at least 3 fields: "Referred To" (stores account name), _fkEncodedDataId (number), Viewed (number)

               A script can take the account name selected by the person logging the referral, the current value of __pkEncodedDataID and create a new record with this data in the Referrals table. Your OnFirstWindowOpen triggered script can then perform a find for all records in this table where Refferred To stores the current user's account name and for which the Viewed field is empty. The script then sets the Viewed field to a value so that the next time it runs only newly added referral records will be found. If any such records are found the value in _fkEncodedDataID can be used in a find or via Go To Related Records to bring up a set of records for the user to review.

          • 2. Re: Sending New Record/Data to another Filemaker Account

                 You would have a one table with "Referrals" and then create a drop down list  based on this table on the data encoding layout (Based on data file).  This will make sure that the correct user is assigned the record.  When a referral logins to the database you would run a script that enters find mode (Insert user name in to referral) and then performs a find.   This will limit all records to user login name.  Note you would need to disable show all records, if the user doesn't need access to other referrals records. (If not disabled, the show all records button would show all records for all referrals) 

                 You also can limit records with a relationship based on Referrals::Referral and the (Data file)  Datafile::Referal. (Whatever you name the file that containts the encoding data)

            • 3. Re: Sending New Record/Data to another Filemaker Account

                   Thanks guys for answering my post but I cant understand some of the things you guys said. Sorry for that call me newbie but Im really are new to filemaker and Im still exploring it and Im getting very interested to it. Here is my detailed project that I want to do.

                   Its sort of a tracking system or is to let user know the status of their document. There is a receiving area which one user is assigned to input all incoming documents/data. The documents have the ff field:

                   Control No., Type of Document , Title, Origin, Date Received, Status, Referred to, Action Taken, Date Actioned, Notes

                   Once the receiving area input the needed fields it will be referred to concerned personnel for appropriate action. There is a possibility that the document can be reffered to not only one personnel until it is finalized or approved.

                   When the personnel login they will see if there is a pending document for their action.

                   There is also a window where user can search the document either by their control no., title, origin or type.

                   Hope you guys can help me with this. I really like filemaker. If its not too much to ask I hope someone will make a video tutorial on how to do this for me. Drinks on me wink. Im using Filemaker pro 12 advanced for less than 2 weeks so Im really new at this. Please please please help me with this.  Thanks everyone in advance. 

              • 4. Re: Sending New Record/Data to another Filemaker Account

                     You've described your project in more detail, but haven't told us what part of our suggested solutions you don't understand.

                     What kind of field is "control No". Is this an externally supplied document control number? If so, you need one more field, defined as an auto-entered serial number field to uniquely identify each record in your table. While it is possible to use an externally supplied control number for this, it raises possible issues in the management of your database that you can avoid by using the serial number field in your table to link it to other related records. This field is often named with this naming convention: __pkTableNameHereID so if your table is named Documents, this field would be named:

                     __pkDocumentsID. __ is two underscores and insures that this field will sort to the top of an alphabetized list of field names--making it easier to find and work iwth. pk stands for "primary key". A primary key is a field used to uniquely identify each record in your table and is in turn the main "match field" used to link it to records in other related tables.

                • 5. Re: Sending New Record/Data to another Filemaker Account

                       Sorry about that PhilModJunk. I watched some tutorials and I think I now understand what you suggested. To clarify things Control No. is the ID with auto-entered serial number. I included this not just for identifying records uniquely but also user can search their document just by entering this number like when they search for the title, type of document or origin of the document it will be displayed in list view. I included it because sometimes the title, type and origin can be too long. But if you have better suggestion please say so.

                       I've set up some other account and now my problem is how can a script be perfomed when a user login? I dont know how to do that yet and I just beginning understanding some script just the easy one. like go to layout and add new record I can do that. But this i need help so can you please instruct me how to do this step by step? Thanks a lot for helping me.

                  • 6. Re: Sending New Record/Data to another Filemaker Account

                         Let's SIMPLIFY the idea. All you need is one field in which you can store the users account name, that's the name they login with and add their password.

                         Now when a user logs in, the script can automatically search that field for their account name and display the record. I think this is what you are interested in.

                         In a 'friendly' database the users might have their actual names as the account name, Mary Smith, Joe Bigtoes, etc. This makes it easy.

                         In a 'more secure' database the account names are scrambled, Mary Smith = xx7rffvv33 and so on. Now you have to do a lookup in a related file. But the scrambled account name can remain hidden.

                         You enter: Mary Smith and the file looks up in the related file and enters xx7rffvv33 in the hidden field for security purposes.

                         Thus you need one extra table for lookups with a minimum of two fields:

                         Persons Name
                         Scrambled account name

                         You can now relate any file to this by adding one field "Persons Name" and forming a relation ship with the account names table.

                         When the user logs in their script looks up their friendly name in the accounts table and then searches for that in any file.

                         Couldn't be simpler.

                    • 7. Re: Sending New Record/Data to another Filemaker Account

                           Sorry Jack, but I don't think that fully addresses the OP's needs. They need to be able to refer specific document records to specific users and to have this notification appear automatically when the user opens the database file for the first time.

                           Before we discuss any scripting, let's look at the tables and relationships you need to pull that off:


                           Documents::Control No = Referrals::Control No

                           See this link: Common Forum Relationship and Field Notations Explained

                           For an explanation of the notation that I am using. I'm showing a one to many relationship here as it is possible that the same document record may need to be referred to more than one person--perhaps at different times over the "life" of the document.

                           And, as Jack describes, you'd add yet another table of User Accounts--though I'd skip the "scrambled account name" feature until you get the rest of the system working. (Since there isn't a need to store any passwords, there isn't an overriding need to scramble the account names, though that does increase security a bit by doing so.)

                      • 8. Re: Sending New Record/Data to another Filemaker Account

                             Thanks Jack and PhilModJunk for your response. To clarify things I will create the filemaker account and password and will set the priviledges and give the personnel their access.. PhilModJunk your right I have one to many relationship as the document can be referred to lets say personnel 1 for initial approval and after his initial approval he can referre it again to another personnel for final approval and when received by the personnel who will make the final approval his action taken field will be approved. 

                             I know a bit about relationale database one to many and many to one, one to one and many to many but Im sort of like lost in scripting.

                             How can I make a script that sort of assign it to an account that if that account logs in to the database that script will be initiated and will perform a find that will only display in the reffered to field his username or account so that the account who is login will only see document that was referred to him/her.

                             Hope that makes it more clear. Thanks guys.

                        • 9. Re: Sending New Record/Data to another Filemaker Account

                               In general terms, referring a document record to another user requires creating new record in the referrals table with the docuement control number and the user's account name. There are a number of ways that you can set that up.

                               One way is to set up a layout based on Documents with a portal to Referrals. If you enable "allow creation of records via this relationship" for Referrals in the relationship between these two tables, you can create a new referral record simply by selecting a user in the Referrals::AccountName field--which can be formatted as a drop down list of person names and their account names by usint the table of accounts both Jack and I have described as the source of values for your value list.

                               There are other ways to create this same record via a script, and that can save scrolling to the bottom of the portal each time you need to make a new referral, but the above non-scripted method is probably the simplest for you to start with. You can explore more sophisticated approaches once you have your referral system working.

                               Now the script:

                               Freeze Window
                               Go To Layout [Referrals]
                               Enter Find Mode []
                               Set Field [Referrals::AccountName ; Get ( AccountName ) ]
                               Set Field [Referrals::viewed ; "=" ] ---> this criterion specifies that the Viewed field is empty
                               Set Error Capture [on]
                               Perform Find []
                               If [ Not Get ( FoundCount ) // if no records were found, no referrals for this user ]
                                  Go To layout [Specify a layout such as one for a dashboard or Main Menu layout were you want users to start if they have no referrals]

                               To set this script to run each time that the file is opened, go to File Options from the File Menu and there you'll find an OnFIrstWindowOpen scriptrigger that can be used to perform the above script.

                               Note, I could use Replace Field Contents here to set "Viewed" to a value to keep them from being listed the next time the user opens the database, but you may want to require that the user select or enter a value in the Viewed field to indicate that they have finished reviewing/approving the document.

                               There are, in fact, a number of ways you can enhance this basic process once you have the basics working for you. You might, for example, want to add an additional field to referrals so that you can use one field to control whether or not it pops up in this list when the users open the file and another that records the disposition status of that referral.

                          • 11. Re: Sending New Record/Data to another Filemaker Account

                                 Hi PhilModJunk thank you again for helping. I followed your intruction but it seems the referall is not working. I've been trying to figure out what did I do but end up with nothing. Maybe I didnt fully understand what you are trying to want me to do. Sorry I depend a lot on visual and get bored at reading. May you can provide me with a step by step image or video of this please?

                                 I really dont know what I've done wrong to explain it to you. The referral is very important and I can't get it to work. Please sir help me. Thank you.

                            • 12. Re: Sending New Record/Data to another Filemaker Account

                                   No videos available and no time to make one.

                                   but it seems the referall is not working.

                                   HOW does it "not work"? That info can be key to diagnosing where this went wrong for you.

                                   What do you see when you go to a table view of your Referrals records?

                                   That can be a key detail in figuring out why things aren't working.

                              • 13. Re: Sending New Record/Data to another Filemaker Account

                                     Here is what I did. I created a 2 table. Document and Referral. In the Document I have created the following field.

                                     _pkDocumentID - auto enter serial, cant modify

                                     Type of Document - text

                                     Title - text

                                     Origin - text

                                     Date Received - date - creation date, cant modify auto

                                     Action Taken - text

                                     Date Approved - date

                                     Scanned File -container

                                     and in the Referral table I created 

                                     __pkReferralID - auto enter serial, cant modify auto

                                     _fkDocumentID - indexed, Auto enter serial, cant modify

                                     ReferredName - text - This is the field where to whom the document will be referred. I made it value list with sample Person1, Person2, Person3


                                     Then I made the Relationship of the 2 tables and check allow creation of records and delete related records.

                                     Here is the my form layout where the receiving officer will accept document ( he will just type until referred to field the rest will be done by the person whom the document will be referred.

                                • 14. Re: Sending New Record/Data to another Filemaker Account

                                       Here is the list view layout where when a person logs in to make the neccesary action he will be brought to this layout and he will see all the documents that have been send to him for action. He can then type in the action taken field and he can refer it to another personel if the document needs final approval.

                                       I have specified the tracking no in the field _pkDocumentID this is so user can just enter this number and view the status of their document. I hope this makes it a lot clearer. I dont even know if what im doing is right. Please teach me to fix this and make it working.. Thanks a lot sir.

                                  1 2 Previous Next