Go to a spesific row in a portal 
Author Message
 Go to a spesific row in a portal

Im new to portals and have some problems understanding this in FM 5.0.

My cumstomer database (CD) is displayed in a portal in the order
database (OD). I want to perform a find request on customer name in OD,
and Im using a script that ends with <Go to Portal Row(CustomerID)> in
the OD.

The problem is that Im always ending up with the same selected row; row
#101 from the CD.

Ive been throught the online documentation, the latest posting here and
some FM websites, but I would be pleased to get some help from you.

Regards
--

 ......_/_/_/_/_/_/_/.....   Web: http://www.***.com/
  ...._/...._/...._/.......   Phone: +47 55924915 - Cell: 97548190
   .._/...._/...._/.........   Address: Fjellbirkeland - 5224 NESTTUN



Mon, 03 Nov 2003 23:18:40 GMT
 Go to a spesific row in a portal

The step "Go to Portal Row" accepts various parameters ("Select First",
"Select Last", etc.) that tell it what portal row to go to. It sounds as
though you have selected "Select, By Field Value" and then chosen the
Customer ID as the field to use (is the Customer ID of the current record
101?).

In any event, you really want  to pass the value of the field in that portal
row, and use it (the value) as a search criterion. While FMP will perform a
search in a related file (i.e., a portal), it is faster to perform that
search locally, in the other file, and then come back when the search is
completed.

In the Customer file, create a script that performs the search, using a
global text field ("gSearch") as the find criterion. You will pass the value
to this global. In Customer, the script might run (if the search is for the
Customer Name):

Set Error Capture[On]
Enter Find Mode[]
Set Field["Customer Name", "gSearch"]
Perform Find[]
...Do stuff if records are found
...Do stuff if no records are found (Status(CurrentError)=401)

Create, in each file, a calculation field ("Constant"), returning a number,
and defined as 1 (the number one). In the Order file, create a 'generic' or
'constant' realationship to Customer, using Constant as the match field on
both sides. The idea is that all records in each file will be related to all
records in the other file. Then, create a script (in Order):

Set Field["Constant::gSearch", "Customer::Customer Name"]
Perform Script[Sub-script, External: "Customer.fp5"]
Do Something Local (like Exit Record/Request, or Go to Field)

The Set Field step passes the value of the Customer Name in the selected
portal row (the cursor must be in the portal row) to gSearch, which then
passes it again in the local Find script in Customer.  "Do Something
Local..." means call any local script step, even if it doesn't really do
something, to return focus to the current file (Order).

--

John Weinshel
Datagrace
Associate Member, Filemaker Solutions Alliance
Vashon Island, WA
(206) 463-1634


Quote:
> Im new to portals and have some problems understanding this in FM 5.0.

> My cumstomer database (CD) is displayed in a portal in the order
> database (OD). I want to perform a find request on customer name in OD,
> and Im using a script that ends with <Go to Portal Row(CustomerID)> in
> the OD.

> The problem is that Im always ending up with the same selected row; row
> #101 from the CD.

> Ive been throught the online documentation, the latest posting here and
> some FM websites, but I would be pleased to get some help from you.

> Regards
> --

>  ......_/_/_/_/_/_/_/.....   Web: http://www.macx.no/
>   ...._/...._/...._/.......   Phone: +47 55924915 - Cell: 97548190
>    .._/...._/...._/.........   Address: Fjellbirkeland - 5224 NESTTUN



Tue, 04 Nov 2003 00:00:25 GMT
 Go to a spesific row in a portal
Thanks for the tips, but it seems that my original posting didnt
decribe the situation well enough.

The thing I want to do is to use a portal for customers in my order
database (OD), for selecting a spesific customer for creating a new
record in OD. The customer database (CD) has more than 1500 records, so
scrolling is not a good opportunity.

The portal I use is showing all the records for the CD, and Im building
a script that goes like this by description:

Enter Find Mode (in OD)
- Manually write in a search in Customer Name Field
Copy the same field
Perform external script for find in CD based on Clipboard
Copy Customer# in CD
Perform extenal script in OD that enters browse mode an selects the
corresponding line in the portal
(There should be an error message somewhere here).

This should allow me to click on the selected line (as a button) and
create a new ordrer with this customers ID, Ill think.

All goes well except that this always brings me to line# 101 in the
portal. The last script is <Go to portal row, By Field Value>, but how
can I manage this to be the right line?

Regards
--

 ......_/_/_/_/_/_/_/.....   Web: http://www.macx.no/
  ...._/...._/...._/.......   Phone: +47 55924915 - Cell: 97548190
   .._/...._/...._/.........   Address: Fjellbirkeland - 5224 NESTTUN



Tue, 04 Nov 2003 02:45:01 GMT
 Go to a spesific row in a portal

Quote:

> Thanks for the tips, but it seems that my original posting didnt
> decribe the situation well enough.

> The thing I want to do is to use a portal for customers in my order
> database (OD), for selecting a spesific customer for creating a new
> record in OD. The customer database (CD) has more than 1500 records, so
> scrolling is not a good opportunity.

> The portal I use is showing all the records for the CD, and Im building
> a script that goes like this by description:

> Enter Find Mode (in OD)
> - Manually write in a search in Customer Name Field
> Copy the same field
> Perform external script for find in CD based on Clipboard
> Copy Customer# in CD
> Perform extenal script in OD that enters browse mode an selects the
> corresponding line in the portal
> (There should be an error message somewhere here).

> This should allow me to click on the selected line (as a button) and
> create a new ordrer with this customers ID, Ill think.

> All goes well except that this always brings me to line# 101 in the
> portal. The last script is <Go to portal row, By Field Value>, but how
> can I manage this to be the right line?

> Regards
> --

>  ......_/_/_/_/_/_/_/.....   Web: http://www.macx.no/
>   ...._/...._/...._/.......   Phone: +47 55924915 - Cell: 97548190
>    .._/...._/...._/.........   Address: Fjellbirkeland - 5224 NESTTUN

You may want to reconsider your CD portal setup. If you create a new
relationship:
  OD field:  SearchCD   type: Text
  CD field:  CustLastName  type: Text

then base your portal on it, you could type a client's LASTNAME into the
"SearchCD" field on your OD screen and only the matching Customers would
then appear in the Portal... should make it easier to select the correct
one without too much scrolling.

I've also created relationships for a Client database using a calculated
field like:
NOTE: THE "PP" REPRESENTS THE "PARAGRAPH" CHARACTER IN THE FILEMAKER
CALCULATION DIALOG.

Left(LastName,1) & "PP" &
Left(LastName,2) & "PP" &
Left(LastName,3) & "PP" &....

etc, etc. Then I can type the first few letters of a client's last name and
the portal re-evaluates and returns only matching clients.

I hope that's not totally irrelevant, good luck with your project...

======================================
Michael Little
NOTE: skip the par three in my address to reply
======================================



Tue, 04 Nov 2003 03:08:50 GMT
 Go to a spesific row in a portal
Is the overall idea to generate a new order form for a given customer?

And, is that "given customer" an existing (a record already in the Customer
file) name, found as a result of a search?

If so, I don't understand why you need the portal. You want to conduct the
search, and then, when the search produces the correct record, create a new
Order for that record. Is that correct? If so, your script (after the Find)
simply needs to pass on the Customer ID to the new Order, and then let all
the other customer dat be entered via lookups.

If I am misunderstanding, and you want to continue with the portal, the
problem with the one script step ("Go to portal row, By Field Value") is
that the field value is currently the Customer ID, which would be the ID of
the current record (not the one in the portal row, but in the parent
record). If I am correct, that step will go to a different row if you
perform the script from a different parent record.

If your situation still requires that you use a portal to select the correct
related record, grab an identifying value from the portal as the very first
script step, while the portal row is selected (after that first step, focus
leaves the portal row and goes to whatever is going on in the script). You
might try, for instance:

Set Field["gID", "Customer::ID"]

That will set the global field "gID" to the value of the related Customer ID
of the currently selected portal row's record. You cn then use that global
value for creating the new Order.

Or, if you want to actually go to that record in the related file, you can
simply use a GTRR:

Go to Related Record (Customer)

That will take the user to the related record of the selected portal row.

--

John Weinshel
Datagrace
Associate Member, Filemaker Solutions Alliance
Vashon Island, WA
(206) 463-1634


Quote:
> Thanks for the tips, but it seems that my original posting didnt
> decribe the situation well enough.

> The thing I want to do is to use a portal for customers in my order
> database (OD), for selecting a spesific customer for creating a new
> record in OD. The customer database (CD) has more than 1500 records, so
> scrolling is not a good opportunity.

> The portal I use is showing all the records for the CD, and Im building
> a script that goes like this by description:

> Enter Find Mode (in OD)
> - Manually write in a search in Customer Name Field
> Copy the same field
> Perform external script for find in CD based on Clipboard
> Copy Customer# in CD
> Perform extenal script in OD that enters browse mode an selects the
> corresponding line in the portal
> (There should be an error message somewhere here).

> This should allow me to click on the selected line (as a button) and
> create a new ordrer with this customers ID, Ill think.

> All goes well except that this always brings me to line# 101 in the
> portal. The last script is <Go to portal row, By Field Value>, but how
> can I manage this to be the right line?

> Regards
> --

>  ......_/_/_/_/_/_/_/.....   Web: http://www.macx.no/
>   ...._/...._/...._/.......   Phone: +47 55924915 - Cell: 97548190
>    .._/...._/...._/.........   Address: Fjellbirkeland - 5224 NESTTUN



Tue, 04 Nov 2003 03:21:14 GMT
 Go to a spesific row in a portal
Thanks a lot, your first suggestion solved the problem for me! Ill take
a look at the other methode too, but I have to spend some more time to
figure it out. Im still a newbie to portals.

Regards
Helge Hafstad
-----------------------------------------------------------------------

Quote:

> You may want to reconsider your CD portal setup. If you create a new
> relationship:
>   OD field:  SearchCD   type: Text
>   CD field:  CustLastName  type: Text

> then base your portal on it, you could type a client's LASTNAME into the
> "SearchCD" field on your OD screen and only the matching Customers would
> then appear in the Portal... should make it easier to select the correct
> one without too much scrolling.

> I've also created relationships for a Client database using a calculated
> field like:
> NOTE: THE "PP" REPRESENTS THE "PARAGRAPH" CHARACTER IN THE FILEMAKER
> CALCULATION DIALOG.

> Left(LastName,1) & "PP" &
> Left(LastName,2) & "PP" &
> Left(LastName,3) & "PP" &....

> etc, etc. Then I can type the first few letters of a client's last name and
> the portal re-evaluates and returns only matching clients.

> I hope that's not totally irrelevant, good luck with your project...

> ======================================
> Michael Little
> NOTE: skip the par three in my address to reply
> ======================================

--

 ......_/_/_/_/_/_/_/.....   Web: http://www.macx.no/
  ...._/...._/...._/.......   Phone: +47 55924915 - Cell: 97548190
   .._/...._/...._/.........   Address: Fjellbirkeland - 5224 NESTTUN


Tue, 04 Nov 2003 06:57:03 GMT
 
 [ 6 post ] 

 Relevant Pages 

1. Go to a spesific portal, next

2. Go to row in portal

3. How to Go to Empty Portal Row

4. 'Go to portal row' not working

5. Goto related from portal --how do I get the selected portal row

6. Oracle Portal-to-Go

7. Portal-to-Go?

8. Need some help on Portal-to-go

9. Portal-to-go available yet ?

10. Oracle Portal-to-Go

11. Oracle Portal-to-Go

12. Portal to go


 
Powered by phpBB® Forum Software