Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3180 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

Aloha Everyone,

 

First off I'm ESL and my gramma is not up to par with an English major. Second, I'm a photographer and not a programmer. That said, I am determine not to let that stop me from learning FM enough to program me a simple but functional DB. I'm familiar enough to understand and get around FM and it's back end but have not spent enough time to know it intimately like one who spend everyday in FM. In other words, I know basic of FM parts and functions and attributes but have not had the opportunity to learn how to connect everything together to make one simple idea to work. Lastly, I'd greatly appreciate you all for taking the time to help me with my issue. I'd only ask if you all can be a little bit more descriptive in your answer then a vague simply answer like "you should use a calculation." 

 

Here is my simple idea but seem complex issue for me:

I have two files, one is a CONTACT file (the starter kit) and another is a CONSENT file I'd created from scratch. Both files have the corresponding table names. I want to be able to type in the name fields of the CONSENT file to check the CONTACT file for a matching name. If there is a match then use that name and associate the CONSENT record to the CONTACT record. If there is no matching record in the CONTACT file then create a new record in the CONTACT file with the name that was entered.

 

UPDATE for clarity:

To clarify I do not want to create any duplicate records nor do I want to import the CONSENT table into the CONTACT. I'll update the post to reflect this.

I want to be able to type the name in the name field of the CONSENT table and have it reference the CONTACT table to see if there is a matching name. If there is a matching name then DO NOT create a new record with the same name in the CONTACT table. Also, that CONSENT record must relate to that name used in the CONTACT table. This is so that I can see how name CONSENT forms are associated to that one name.

Now, if there is no matching name then use that name that was just inputed in the name field of the CONSENT record to create a new CONTACT record with that name. Essentially automatically creating a new CONTACT with that new in the CONTACT table.

 

This is what I have going so far:

I have related the two files.

With just the Manage DB relationship and field auto-enter calculation I'm able to auto complete the name and create a new record. However, this just create duplicates contact record which is a no go.

I know this is not the way to go and assume it's either a combination of calculation and/or scripting. I just don't know where to begin.

 

How do I start this from a step by step instruction?

 

Please feel free to ask me for clarification and I'll do my best to make sure we're both on board with our understanding. Again, thank you for your kindness for taking the time to help out on my problem!

 

Mahalo all!

Edited by tdub808
Fixed the Font to be more readable
Posted
3 minutes ago, comment said:

It's difficult to recommend a strategy without knowing why you need to do this. Normally, you would try and eliminate duplicate data, not create it.

That said, I believe the easy way would be to import the CONSENT table into CONTACT, using the 'update matching records' method:
http://www.filemaker.com/help/14/fmp/en/html/import_export.18.11.html#1027964

Aloha comment,

Thank you for your prompt reply. To clarify I do not want to create any duplicate records nor do I want to import the CONSENT table into the CONTACT. I'll update the post to reflect this.

I want to be able to type the name in the name field of the CONSENT table and have it reference the CONTACT table to see if there is a matching name. If there is a matching name then DO NOT create a new record with the same name in the CONTACT table. Also, that CONSENT record must relate to that name used in the CONTACT table. This is so that I can see how name CONSENT forms are associated to that one name.

Now, if there is no matching name then use that name that was just inputed in the name field of the CONSENT record to create a new CONTACT record with that name. Essentially automatically creating a new CONTACT with that new in the CONTACT table.

I hope this clear that confusion up. I'll check out your link. Again, Thank you!

 

Posted
2 minutes ago, tdub808 said:

I want to be able to type the name in the name field of the CONSENT table and have it reference the CONTACT table to see if there is a matching name. If there is a matching name then DO NOT create a new record with the same name in the CONTACT table.

You shouldn't match on names, because two people can have the same name and because names can change.

If you are creating a new record in CONSENT, you should select a contact from existing contacts, and relate it to the current record by ContactID, not by name. If you don't find the contact you want, then create a new contact record. Depending on your workflow, you could that first, before creating a new record in CONSENT.

Posted
2 minutes ago, comment said:

You shouldn't match on names, because two people can have the same name and because names can change.

If you are creating a new record in CONSENT, you should select a contact from existing contacts, and relate it to the current record by ContactID, not by name. If you don't find the contact you want, then create a new contact record. Depending on your workflow, you could that first, before creating a new record in CONSENT.

 

Thank you so much comment! You word it perfectly and is exactly how I need to start! This help so much already.

So here's what I'm thinking in term of the workflow and correct me if I'm wrong:

  1. Weather the client is a new client or not they will perform a search for their name in the CONTACT file. If there is no match then give them the option to creating a new CONTACT record.
  2. Once either an existing CONTACT record is found or a new record is created in the CONTACT file the client have the option to click on a button to create a new CONSENT form. This will automatically populate the client's CONTACT info to the newly created CONSENT form.
  3. So I'm thinking it's something have to do with portal to the related record.

Now this is somewhat familiar to me if I may have sense this somewhere. I'll search for it and will update if I can find it.

So is there a method and/or either this is possible in FM for the workflow below? I guess the objective is to reduce the complexity and improve usability aka ease-of-use for the user and not the tech.

  1. Create a new consent form.
  2. User type in contact info. As data is inputed it automatically check the Contact file for a match. If FM can't perform this auto-checks then maybe on click of a button to perform a script to check?
  3. If match show a listing of match name for user to pick. If no match, ask user to create a new contact record.
  4. Contact info is then auto populate in the Consent form and consent form record is then associated with the contact record.

Thoughts on this?

Posted

I am not comfortable advising on workflow, when I know practically nothing about your solution. Any one of the options you described is feasible - though not in the exact manner you have described. For example, in your second option, user would have to enter the name/s into global field/s. Or they would have to enter Find mode first (which is basically your first option). Then a script would perform the find, create a new contact record if no existing record was found, grab the new/existing record's ContactID value, and set the new consent record's foreign key value to that.

 

Posted
2 hours ago, comment said:

I am not comfortable advising on workflow, when I know practically nothing about your solution. Any one of the options you described is feasible - though not in the exact manner you have described. For example, in your second option, user would have to enter the name/s into global field/s. Or they would have to enter Find mode first (which is basically your first option). Then a script would perform the find, create a new contact record if no existing record was found, grab the new/existing record's ContactID value, and set the new consent record's foreign key value to that.

 

commit thank you for the example. It really help to give me some structure and clarity to my thoughts on how to approach this. You're making what seem difficult and near impossible for me to figure out into something that's giving me confident and hope to completing this. I'm very excited about working this solution out with your help and maybe others too! Deeply grateful!

Here's my current paper trail solution:

Client/model want to be photograph --> I then collect basic info (name, phone, address, etc) --> If client/model agreed to the terms laid out then a consent form is generated. At which point on paper Client/model would write all that in --> The are given a copy. 

Here's my idea for a digital workflow options:

Option #1: Client/modle want to be photograph --> I open the CONTACT file --> Perform a find/search for their name --> If the result is no match found --> Create new record --> Then collect basic info --> If client/model agreed to the terms laid out --> Click on a button to create a new CONSENT form record--> FM script would auto populate the basic info in the CONSENT form record that was created. --> All the client/model would need to do is sign in the signature box --> Then I would click email copy to client/model's email address --> Done

Option #2( this now include your suggestion): Client/model want to be photograph --> If client/model agreed to the terms laid out --> I open the CONSENT file and create a new CONSENT record--> client/model enter their name(s) into global field(s) --> This would somehow automatically perform a search as each key is entered (if possible by FM) OR triggered on exist of the last field entered --> Then a script would perform the find, create a new contact record if no existing record was found, grab the new/existing record's ContactID value, and set the new consent record's foreign key value to that. [ Would this populate the newly created CONTACT record with the basic contact info that was entered in the CONSENT form record fields?  ] --> All the client/model would need to do is sign in the signature box --> Then I would click email copy to client/model's email address --> Done

I hope I'd clarified my thought on this solution. I'd would appreciate your feedback on the two digital workflow options. Again, deeply grateful for your help on this!

Posted

Let me ask a preliminary question:

An existing client wants to be photographed. He/she has already signed a consent form on a previous occasion. Do you need to create a new consent form, different from the previous one? If yes, in what way would it be different?

 

Posted
24 minutes ago, comment said:

Let me ask a preliminary question:

An existing client wants to be photographed. He/she has already signed a consent form on a previous occasion. Do you need to create a new consent form, different from the previous one? If yes, in what way would it be different?

 

Yes, a new consent form is create for each shoot and the only things would be different is the date stamp, info pertaining to that particular shoot (such as location, description of production), and he/she signature. Only the contact info will be reused when available.

Posted

I believe the most convenient procedure would be this:

1. Find out if the client exists or is a new one.

2. If they are new, create a new record in Clients for them.

3. Create a new related record in the CONSENT table (which IMHO would be more aptly named as Shoots).

You could script this entirely from start to finish, by doing something like (very roughly):

Go to Layout [ Clients ]
Enter Find Mode []
Show Custom Dialog [ Clients::FirstName, Clients::LastName ]
Perform Find []
If [ not Get (FoundCount) ]
 Modify Last Find
 Set Variable [ $fName; Clients::FirstName ]
 Set Variable [ $lName; Clients::LastName ]
 Enter Browse Mode
 New Record
 Set Field [ Clients::FirstName; $fName ]
 Set Field [ Clients::LastName;  $lName ]
 Commit Records
End If
Set Variable [ $clientID; Clients::ClientID ]
Go to Layout [ Shoots ]
New Record
Set Field [ Shoots::ClientID; $clientID ]
Go to Layout [ Clients ]

But you might want to divide this into several steps, allowing you to enter the relevant info at each step.

Note also that a find may fail because you have mistyped the name - so perhaps creating a new record automatically is not such a good idea.

  • Like 1
Posted
7 minutes ago, comment said:

I believe the most convenient procedure would be this:

1. Find out if the client exists or is a new one.

2. If they are new, create a new record in Clients for them.

3. Create a new related record in the CONSENT table (which IMHO would be more aptly named as Shoots).

You could script this entirely from start to finish, by doing something like (very roughly):


Go to Layout [ Clients ]
Enter Find Mode []
Show Custom Dialog [ Clients::FirstName, Clients::LastName ]
Perform Find []
If [ not Get (FoundCount) ]
 Modify Last Find
 Set Variable [ $fName; Clients::FirstName ]
 Set Variable [ $lName; Clients::LastName ]
 Enter Browse Mode
 New Record
 Set Field [ Clients::FirstName; $fName ]
 Set Field [ Clients::LastName;  $lName ]
 Commit Records
End If
Set Variable [ $clientID; Clients::ClientID ]
Go to Layout [ Shoots ]
New Record
Set Field [ Shoots::ClientID; $clientID ]
Go to Layout [ Clients ]

But you might want to divide this into several steps, allowing you to enter the relevant info at each step.

Note also that a find may fail because you have mistyped the name - so perhaps creating a new record automatically is not such a good idea.

comment thank you so much for the script step above! Also, a big thank you for being very patience with me in clearing out my fog of thoughts on this solution! I'll give this a go tomorrow and update this post to reflect the working solutions (if it works). You will be heavily credit of course.

One last thing, the admin move this post into Value Lists category as he thinks it's best fit. Any thoughts as to why it would make sense for Value Lists to be a fix for this solution? In the meantime, I'm going to read up on it with this http://help.filemaker.com/app/answers/detail/a_id/5833/~/creating-conditional-value-lists.

Always grateful for your help comment!

This topic is 3180 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.