Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Portal Navigation

 
   Database Forums (Home) -> FileMaker RSS
Next:  Complex UPDATE using SUBSTRING  
Author Message
eric72

External


Since: Oct 10, 2008
Posts: 7



(Msg. 1) Posted: Fri Nov 14, 2008 3:25 pm
Post subject: Portal Navigation
Archived from groups: comp>databases>filemaker (more info?)

Hi,

I'd like to create a DB. This DB contains some records : Book_1, Book_2....,
Book_x

In Book_1, there is a PORTAL which contains
at the left : Chap_1
Chap_2
Chap_3
Chap_4
...
and at the right : Field_A
Field_B
(not the same line)

If I click on Chap_1, this displays some information in Field_A & Field_B
the same, click on Chap_2, this displays some information in
Field_A & Field_B (of Chap_2)

My question : Is it possible that the PORTAL and Field_A & Field_B
in the same LAYOUT ? (and there should be a script to
create
the chap_x because "new record" is used to create
new book_y)

If yes, how can do that, your help will be highly appreciated.

Thank you in advanced

 >> Stay informed about: Portal Navigation 
Back to top
Login to vote
Chris Brown

External


Since: Jun 23, 2003
Posts: 107



(Msg. 2) Posted: Mon Nov 17, 2008 6:25 pm
Post subject: Re: Portal Navigation [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

eric72 wrote:
> Hi,
>
> I'd like to create a DB. This DB contains some records : Book_1, Book_2....,
> Book_x
>
> In Book_1, there is a PORTAL which contains
> at the left : Chap_1
> Chap_2
> Chap_3
> Chap_4
> ...
> and at the right : Field_A
> Field_B
> (not the same line)
>
> If I click on Chap_1, this displays some information in Field_A & Field_B
> the same, click on Chap_2, this displays some information in
> Field_A & Field_B (of Chap_2)
>
> My question : Is it possible that the PORTAL and Field_A & Field_B
> in the same LAYOUT ? (and there should be a script to
> create
> the chap_x because "new record" is used to create
> new book_y)
>
> If yes, how can do that, your help will be highly appreciated.
>
> Thank you in advanced
>
>

I am assuming you are on a Book table layout, and the portal just
displays chapters related to the current book record.

script on the portal row parses the Chapt_ID to a global g_ChaptID
create a multi-parameter relationship Book_ID::Book_ID and the global to
Chapt_ID
add the Field_A and Field_B fields to the layout, using the new rel


To create a new chapter for the current book record, depends on what FM
version you are using.

If FM9;
parse BookID to variable $_BID
go chapter layout
new record
hard code $_BID to Chapter::Book_ID
calculate and hard code the chapter number (several ways to do this)
return to Book layout
commit/refresh


or use an acrr (allow creation related record) rel
calculate and enter the new chapter number into a global
create an acrr rel BookID and ChapterNo from Book to Chapter table
set field A = ""
and variations on this


The chapter no could be calculated from the count of related chapters + 1

 >> Stay informed about: Portal Navigation 
Back to top
Login to vote
eric72

External


Since: Oct 10, 2008
Posts: 7



(Msg. 3) Posted: Tue Nov 18, 2008 5:25 pm
Post subject: Re: Portal Navigation [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Chris Brown" wrote in message

> eric72 wrote:
>> Hi,
>>
>> I'd like to create a DB. This DB contains some records : Book_1,
>> Book_2...., Book_x
>>
>> In Book_1, there is a PORTAL which contains
>> at the left : Chap_1
>> Chap_2
>> Chap_3
>> Chap_4
>> ...
>> and at the right : Field_A
>>
>> Field_B (not the same line)
>>
>> If I click on Chap_1, this displays some information in Field_A &
>> Field_B
>> the same, click on Chap_2, this displays some information in
>> Field_A & Field_B (of Chap_2)
>>
>> My question : Is it possible that the PORTAL and Field_A & Field_B
>> in the same LAYOUT ? (and there should be a script
>> to create
>> the chap_x because "new record" is used to create
>> new book_y)
>>
>> If yes, how can do that, your help will be highly appreciated.
>>
>> Thank you in advanced
>
> I am assuming you are on a Book table layout, and the portal just
> displays chapters related to the current book record.
>
> script on the portal row parses the Chapt_ID to a global g_ChaptID
> create a multi-parameter relationship Book_ID::Book_ID and the global to
> Chapt_ID
> add the Field_A and Field_B fields to the layout, using the new rel
>
>
> To create a new chapter for the current book record, depends on what FM
> version you are using.
>
> If FM9;
> parse BookID to variable $_BID
> go chapter layout
> new record
> hard code $_BID to Chapter::Book_ID
> calculate and hard code the chapter number (several ways to do this)
> return to Book layout
> commit/refresh
>
>
> or use an acrr (allow creation related record) rel
> calculate and enter the new chapter number into a global
> create an acrr rel BookID and ChapterNo from Book to Chapter table
> set field A = ""
> and variations on this
>
>
> The chapter no could be calculated from the count of related chapters + 1

---------------------------------------------------------------------------------

Hello Chris,

You are right, I'm on a Book table layout, and the portal just
displays chapters related to the current book record.

I create two tables: (and two layouts Book & Chapter)

Table_Book : Book_ID ; Field_A ; Field_B ; global_ChaptID

Table_Chapter : Book_ID2 ; Chapter_ID ;

and two relationships:

Relationship 1 : Book_ID = Book_ID2

Relationship 2 : global_ChaptID = Chapter_ID


and I don't know where Field_A and Field_B connect to ?


(I use FM 9 advanced)

For the script, I don't understand your words "Parse" and "hard"

Set Field [ Table_Book::global_ChaptID ; Table_Chapter::Chapter_ID]

Go to Layout [Chapter]

New Record/Request

....

....

Go to Layout [Book]

Commit Records/Requests []

Refresh Window



Can you help me to complete the script because it is not
clear for me and it's a little difficult to understand
your idea.

Thank you very much
 >> Stay informed about: Portal Navigation 
Back to top
Login to vote
Chris Brown

External


Since: Jun 23, 2003
Posts: 107



(Msg. 4) Posted: Wed Nov 19, 2008 8:25 pm
Post subject: Re: Portal Navigation [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

eric72 wrote:
> "Chris Brown" wrote in message
>
>> eric72 wrote:
>>> Hi,
>>>
>>> I'd like to create a DB. This DB contains some records : Book_1,
>>> Book_2...., Book_x
>>>
>>> In Book_1, there is a PORTAL which contains
>>> at the left : Chap_1
>>> Chap_2
>>> Chap_3
>>> Chap_4
>>> ...
>>> and at the right : Field_A
>>>
>>> Field_B (not the same line)
>>>
>>> If I click on Chap_1, this displays some information in Field_A &
>>> Field_B
>>> the same, click on Chap_2, this displays some information in
>>> Field_A & Field_B (of Chap_2)
>>>
>>> My question : Is it possible that the PORTAL and Field_A & Field_B
>>> in the same LAYOUT ? (and there should be a script
>>> to create
>>> the chap_x because "new record" is used to create
>>> new book_y)
>>>
>>> If yes, how can do that, your help will be highly appreciated.
>>>
>>> Thank you in advanced
>> I am assuming you are on a Book table layout, and the portal just
>> displays chapters related to the current book record.
>>
>> script on the portal row parses the Chapt_ID to a global g_ChaptID
>> create a multi-parameter relationship Book_ID::Book_ID and the global to
>> Chapt_ID
>> add the Field_A and Field_B fields to the layout, using the new rel
>>
>>
>> To create a new chapter for the current book record, depends on what FM
>> version you are using.
>>
>> If FM9;
>> parse BookID to variable $_BID
>> go chapter layout
>> new record
>> hard code $_BID to Chapter::Book_ID
>> calculate and hard code the chapter number (several ways to do this)
>> return to Book layout
>> commit/refresh
>>
>>
>> or use an acrr (allow creation related record) rel
>> calculate and enter the new chapter number into a global
>> create an acrr rel BookID and ChapterNo from Book to Chapter table
>> set field A = ""
>> and variations on this
>>
>>
>> The chapter no could be calculated from the count of related chapters + 1
>
> ---------------------------------------------------------------------------------
>
> Hello Chris,
>
> You are right, I'm on a Book table layout, and the portal just
> displays chapters related to the current book record.
>
> I create two tables: (and two layouts Book & Chapter)
>
> Table_Book : Book_ID ; Field_A ; Field_B ; global_ChaptID
>
> Table_Chapter : Book_ID2 ; Chapter_ID ;
>
> and two relationships:
>
> Relationship 1 : Book_ID = Book_ID2
>
> Relationship 2 : global_ChaptID = Chapter_ID
>
>
> and I don't know where Field_A and Field_B connect to ?
>
>
> (I use FM 9 advanced)
>
> For the script, I don't understand your words "Parse" and "hard"
>
> Set Field [ Table_Book::global_ChaptID ; Table_Chapter::Chapter_ID]
>
> Go to Layout [Chapter]
>
> New Record/Request
>
> ...
>
> ...
>
> Go to Layout [Book]
>
> Commit Records/Requests []
>
> Refresh Window
>
>
>
> Can you help me to complete the script because it is not
> clear for me and it's a little difficult to understand
> your idea.
>
> Thank you very much
>
>
>


Hi Eric

Parse: extract the value required, from the source data

Hard code: record the value/data in a 'non'volatile' field (i.e. text,
number ...) field, as distinct to holding the value temporarily in a
variable or global. The value is going to be used, in this instance, as
a foreign key, so has to be recorded permanently.

<<
> Table_Book : Book_ID ; Field_A ; Field_B ; global_ChaptID
>
> Table_Chapter : Book_ID2 ; Chapter_ID ;
>


If FieldA and FieldB are the chapter content (I am assuming), then they
should be in the Chapter table, and not the Book table(as you last
indicated)


So you are on the Book layout
The portal on Book layout displays the related Chapters for that Book
Record, using Rel_1 (Book_BID::Chapter_BID)

The select/display BookChapter script is placed on the portal row. The
script grabs/parses the portal row ChaptID, and records that value in a
global g-ChapID; this becomes a key to establish rel2
The FieldA FieldB chapter content/details RELATED fields are placed on
the Book layout, external to the portal. These fields use Rel_2 which
must be a multi-paramater rel using both BookID and g_ChapterID

Book_BookID::Chap_BookID
Book_g_ChapID::Chap_ChapID

The Rel_2 must be both BookID and ChaptID or else the related chaptID
displayed will be the FIRST chapter record found by a single parameter
(ChaptID) rel (depending on the sort) i.e it will be the same chapt
record for every book record. A bit difficult to explain, but will be
obvious when you step through book records and the same Chapt 2 details
are displayed on every Book record for example.


The create a new Chapter script, could either
1 use a 3rd rel (acrr), or
2. grab the origin BookID

calculate the count of chapters for the book, and so the new chapt
number = count +1 ; temporarily hold in variable $_Chapt

go to Chapt layout, create a new Chapt record
record/stamp/hard code the origin bookID to the new Chapt recor
hard code/record/stamp the new Chapt number (initailly calculatated from
the count of chapters for the origin book
return to the book layout

refresh the window
commit the record


(the last 2 steps are not actually necessary in this instance, as
changing layouts will achieve the same result, however I included this
as they are a worthwhile/safe last steps in all scripts; That way you
don't get caught out when they are required.


regards
Chris
 >> Stay informed about: Portal Navigation 
Back to top
Login to vote
eric72

External


Since: Oct 10, 2008
Posts: 7



(Msg. 5) Posted: Sun Nov 23, 2008 5:25 am
Post subject: Re: Thank you ! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Chris,

Thanks a lot, everything is ok now.

Best regards,

Eric
 >> Stay informed about: Portal Navigation 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
portal - I am puzzled why my portal is showing only one record from its related table, even though the related table holds up to a dozen of related records. The first table holds info about a job, and the other table holds transactions happening within the first....

Portal sorting in FM7 - I have a FM7 database with a table for "Ads" -- Advertisements and a related table "insertions" which gives me the specific dates of the magazine issues that a particular ad appears in. The "insertion" field is a select list...

Portal with Found Set - How Can I make a simple portal where in each row there is one of the fields of each record in the currently found set? (like show the names of contacts that are in the found set)? I want the thing to reflect the actual found set when it changes. Thank...

Portal problem - FileMaker 6.0 I have a portal with a large number of payments per person. The relationship is SS number. I only need to show the most recent payment. In the portal file I have identified the most recent payment by using the MAX function. For the most....

Another portal questions - Thanks to a couple of gurus I was able to solve my problem. I have another problem though and here it is: I do not want a portal to show up when there is no related record. This was working before I made changes to the pen color and fill color and a ..
   Database Forums (Home) -> FileMaker All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]