Solved

Filemaker Pro 12

Posted on 2013-02-06
15
402 Views
Last Modified: 2013-02-10
I have a database with two tabs.  In the first tab, I have fields labeled "first" and "last" which comprise a client's name.  in the second tab, I have a field "full name".   I'd like to  create a button or a check box on the first tab, that, when selected, will insert and concatenate the first and last name from tab one to the full name in tab two.  This needs to operate for case by case for each record.  I cannot figure out the steps or the script for this.   Appreciate some helpl.  Thanks.
0
Comment
Question by:adammatthews
  • 8
  • 7
15 Comments
 
LVL 11

Expert Comment

by:Andrew Angell
ID: 38860688
Script would be...

Set Field[tablename::full_name; invoices::first_name&" "&invoices::last_name]
Commit Records/Requests[Skip data entry validation; No dialog]

Then you can just bind that script to the check box or whatever you're using with a Script Trigger.
0
 

Author Comment

by:adammatthews
ID: 38861224
Ok, so I created a checkbox with "client", "vendor" and "misc" .  How do I bind it to the script and activate only if "client" is checked?
0
 
LVL 11

Expert Comment

by:Andrew Angell
ID: 38861303
You could use a script trigger or you could just set up the checkbox set as a button and bind it to a script.

Your script would use if/then logic to check the value of the field, and then do what I originally posted in cases where you want to, but do nothing otherwise.

Sorry, I don't have more time right now or I would try to give you better samples, but that's basically all there is to it.
0
 

Author Comment

by:adammatthews
ID: 38861496
Sorry but I'm a beginner and need more help with all the steps.  How do I use the "If" statement and how do I "bind" to the correct checkbox selection?
0
 
LVL 11

Expert Comment

by:Andrew Angell
ID: 38861522
If nobody else jumps in soon I'll make a little video for you.  I just don't have time right this moment.  Sorry.
0
 

Author Comment

by:adammatthews
ID: 38861534
I think what would really help is if, based on the info I provided, you could just write the script with the "if" statement and explain the steps involved in "binding".   A copy of the file is attached to make this easier.  Thanks.
Contacts-experiment-Copy-Clone.fmp12
0
 
LVL 11

Accepted Solution

by:
Andrew Angell earned 500 total points
ID: 38861681
Ok, I've setup a script in this file called UpdateLeadFullName, and I've used a script trigger to bind that script to the drop down field you have (I don't see check boxes..??)

If you go into layout mode and right click on the drop down field you'll see a Set Script Triggers option.  Go into that and you'll see how I've bound the new script to this item via script trigger.  Any time that value changes it runs the script.

This probably wouldn't be ideal, because if that value was set prior to the name getting filled in and then never touched again the script wouldn't run, but this will at least give you an idea of how it's done.
Contacts-experiment-Copy-Clone.fmp12
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:adammatthews
ID: 38861867
OK, great.  Almost there.  If I wanted "Company" in the leads tag to equal "Company" in the "Contact" tab using the same trigger, would I just add another If statement?  How should that read?  Also, when I open the file, it shows a contracted form view and I have to select an icon to the left of the name for the full form to show.  Is there a way to default to full form when opened?  Thanks so much for the help.
0
 
LVL 11

Expert Comment

by:Andrew Angell
ID: 38861904
You would just add an additional Set Field statement into the existing If/Then code.  That is, if you're still basing it on that value equaling Client.  If you need to make changes based on different values for that field you would use Else If statements.  

That said, the way you have it right now the Company field is the same for both tabs (Contacts::Company) so you if you change it in one place that same change will take place in the other.  You would need to separate that into separate fields (or even better, separate tables) in order to keep them separate from each other.  

For the layout that it's starting on, your file actually has some logic in place to decide what layout to drop you on.  

If you go to File -> File Options, and then click into the Script Triggers tab you'll see that it's currently setup to run the "Trigger | On First Window Open" script when that window is first opened.  So then if you open up that script you'll see it's checking whether or not they're on an iPad or in regular FileMaker Pro, and based on that it sends them to the Contacts layout.  So in your case you could simply change that line.  

Go to Layout["Contacts"] and Go to Layout["Contacts | iPhone"] would be come Go to Layout["Contact Details"] and Go to Layout["Contact Details | iPhone"] accordingly.

By the way, it looks like you'll be needing a lot more help on this thing if you're struggling with these basics.  Sites like this are great for that, but you might find value in my training services I offer.  If you're interested in more information on that please contact me directly.
0
 

Author Comment

by:adammatthews
ID: 38862007
Thanks for your patience.  I would be interested in contacting you directly.  Contact info?
I tried to edit the script but did not see how to change the lines as you suggested?
0
 
LVL 11

Expert Comment

by:Andrew Angell
ID: 38862013
Yeah, this is definitely going beyond what I can offer here.  You can reach me through my website.  Just use the contact page.
0
 

Author Comment

by:adammatthews
ID: 38871561
Andrew,

When I go to edit the "On First Window Open Script" to change the line as you suggested, it does not let me edit.  How do I change the line?
0
 
LVL 11

Expert Comment

by:Andrew Angell
ID: 38872312
Not sure what you'd be running into there.  It's allowing me to edit that script just fine when I open the file you originally sent and the one I sent back.

I would say it sounds like you're not signed in as an admin, but it look like it's loading that by default.  I'd have to get a look at what you're seeing.
0
 

Author Comment

by:adammatthews
ID: 38873403
can you show me how the full script should read?
0
 
LVL 11

Expert Comment

by:Andrew Angell
ID: 38874837
The script doesn't change except that one line.  Just change the layout name like I said.  

I'm going to have to ask you to post new questions if you need more detail than that.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now