Newbie has 2 questions 
Author Message
 Newbie has 2 questions

Using Filemaker Pro 6.0 windows version

I am building a customer contact database for salespeople to use.

I have two files: Customer, Contact

The Customer file has the main information about a customer and the related
Contact file has all the contact info for contacts at the related customer.

Question 1

Long Version:

I have a button on the main Customer file that will open related records in
the Contact file. It works fine. However in the Contact file I have a
browsing type layout for viewing records and an envelope layout. When I hit
the button on the Customer file record to open the related contacts, the
layout that opens is the last used. sometimes the envelope layout is the one
that opens. I would like the browsing layout to be the one that opens from
the button in the Customer file.

I have played with scripts but cannot seem to accomplish what I am trying to
do. The File Open command opens a field but according to the book subsequent
script commands still operate in the original file not the newly opened one.

Short Version:

So what I am trying to do is from one file have a button , open another file
and go to a particular layout, not necessarily the last one used.

Question 2

Long version:

I have in the contact file a layout I want to use for a search layout. I
have one now that displays the current record. If you switch to find mode
you the fields blank out and you can enter your search criteria and away you
go. However, I want to have the search layout either open empty or open with
the current record locked so the salesperson cannot, by mistake, enter data
into one of the fields before they hit the find button that switches to find
mode. I tried changing the fields to "prevent entry" but that locks them out
of the Find mode entry, so they cannot enter search criteria.

Short Version:

How do I prevent entry in field of a layout, thus protecting the record from
change, yet allow the user to switch to Find mode and enter search criteria?

Thanks in advance for your assistance.



Mon, 07 Feb 2005 23:09:43 GMT
 Newbie has 2 questions



Quote:
> Using Filemaker Pro 6.0 windows version

> I am building a customer contact database for salespeople to use.

> I have two files: Customer, Contact

> The Customer file has the main information about a customer and the related
> Contact file has all the contact info for contacts at the related customer.

> Question 1

> Long Version:

> I have a button on the main Customer file that will open related records in
> the Contact file. It works fine. However in the Contact file I have a
> browsing type layout for viewing records and an envelope layout. When I hit
> the button on the Customer file record to open the related contacts, the
> layout that opens is the last used. sometimes the envelope layout is the one
> that opens. I would like the browsing layout to be the one that opens from
> the button in the Customer file.

Create a script in Contact file
GotoLayout(BrowseLayout)
Have the script in your Customer database call the script in the Contact
file
PreformScript(ScriptNameInContacts) [External Script]
There is no need for the open script step.

- Show quoted text -

Quote:

> I have played with scripts but cannot seem to accomplish what I am trying to
> do. The File Open command opens a field but according to the book subsequent
> script commands still operate in the original file not the newly opened one.

> Short Version:

> So what I am trying to do is from one file have a button , open another file
> and go to a particular layout, not necessarily the last one used.

> Question 2

> Long version:

> I have in the contact file a layout I want to use for a search layout. I
> have one now that displays the current record. If you switch to find mode
> you the fields blank out and you can enter your search criteria and away you
> go. However, I want to have the search layout either open empty or open with
> the current record locked so the salesperson cannot, by mistake, enter data
> into one of the fields before they hit the find button that switches to find
> mode. I tried changing the fields to "prevent entry" but that locks them out
> of the Find mode entry, so they cannot enter search criteria.

Global fields work great for this. Create a layout named "Find"
Create global fields for the fields you want to allow finds for.
Create a find script.
GotoLayout(Find)
SetErrorCapture[ON]
EnterFindMode[]
SetField(Name, GlobalName)
SetField(City, GlobalCity)
* Make a Setfield for all find fields *
PreformFind[]
If(Status(CurrentFoundCount) = 0
ShowMessage("No record found")
ShowAllRecords[]
EndIf[]
GotoLayout(BackToYourOriginalLayout)

Quote:
> Short Version:

> How do I prevent entry in field of a layout, thus protecting the record from
> change, yet allow the user to switch to Find mode and enter search criteria?

> Thanks in advance for your assistance.

--
Michael Stout

http://www.fmpdev.com/


Mon, 07 Feb 2005 23:47:44 GMT
 Newbie has 2 questions


Quote:
> I have two files: Customer, Contact

> The Customer file has the main information about a customer and the related
> Contact file has all the contact info for contacts at the related customer.

May I ask why two files?

Quote:
> How do I prevent entry in field of a layout, thus protecting the record from
> change, yet allow the user to switch to Find mode and enter search criteria?

Another possibility is to make find mode appear distinctly different from
browse mode.

One way to do this is to create a single global text field then place it in
a prominent position on the layout (either in an empty space or over
something that doesn't contain searchable fields).  Format it as
non-enterable, opaque and in a large, bold, brightly coloured font.

Then create a scripted find button:

Allow User Abort [Off]
Set Field [global text, "FIND MODE"]
Enter Find Mode [Pause]
Perform Find []
Set Field [global text, ""]

If users are instructed to always use the find button rather than the menu
command to perform finds, they will get used to seeing the find mode banner
whenever they perform a find, so should be less inclined to accidentally
enter search criteria in browse mode.

If you don't normally show the status area, using the Toggle Status Area
[Show] script step is not only a good way to make find mode look different,
but to offer the user more tools for working within find mode.  Don't forget
to hide the Status Area again at the end of the script.

If you don't want to show the status area at all, you can turn the find mode
button into a continue button.  Create another global text field.  Enter
"Find" in it, then format it to not allow entry, then place it over the a
blank button formatted to run the find script:

Allow User Abort [Off]
If [Status(CurrentMode) = 0]
     Set Field [global text 1, "FIND MODE"]
     Set Field [global text 2, "Continue"]
     Enter Find Mode [Pause]
     Perform Find []
     Set Field [global text 1, ""]
     Set Field [global text 2, "Find"]
Else
     Perform Find []
     Set Field [global text 1, ""]
     Set Field [global text 2, "Find"]
End If

Don't forget to include error checking for no records found and an
alternative outcome for that event.

--
Bridget Eley



Tue, 08 Feb 2005 05:11:18 GMT
 Newbie has 2 questions

Quote:



>> I have two files: Customer, Contact

>> The Customer file has the main information about a customer and the related
>> Contact file has all the contact info for contacts at the related customer.

>May I ask why two files?

I think his "customers" are institutions and his "contacts" are various
people who are affiliated with those institutions.

--



Tue, 08 Feb 2005 05:29:21 GMT
 Newbie has 2 questions
PS  I forgot to mention that if you want to use this script (to toggle
between the Find and Continue button) you must set the button to resume
currently paused scripts (Resume option in Specify Button dialog).

--
Bridget Eley



Quote:
> If you don't want to show the status area at all, you can turn the find mode
> button into a continue button.  Create another global text field.  Enter
> "Find" in it, then format it to not allow entry, then place it over the a
> blank button formatted to run the find script:

> Allow User Abort [Off]
> If [Status(CurrentMode) = 0]
> Set Field [global text 1, "FIND MODE"]
> Set Field [global text 2, "Continue"]
> Enter Find Mode [Pause]
> Perform Find []
> Set Field [global text 1, ""]
> Set Field [global text 2, "Find"]
> Else
> Perform Find []
> Set Field [global text 1, ""]
> Set Field [global text 2, "Find"]
> End If

> Don't forget to include error checking for no records found and an
> alternative outcome for that event.

> --
> Bridget Eley



Tue, 08 Feb 2005 06:24:22 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Newbie having problems with update method failure

2. Ultra-newbie quesiton: having trouble creating new server registration

3. Newbie having trouble with Object Error

4. Help ! Delphi Newbie, having problem with Data Modules

5. Newbie help - still having problem with rel DB

6. Having problems creating tables for auditing - newbie

7. newbie just having installed and playing with the samples

8. (newbie) having trouble installing Red Hat Database

9. Newbie having trouble with toolbar

10. Having "HAVING" problems with GROUP BY.

11. Newbie...Newbie Question

12. Newbie -very newbie- question


 
Powered by phpBB® Forum Software