Jump to content
Sign in to follow this  
synergy

Portal's and self-joins in single file?

Recommended Posts

Need help! Alright is it possible to have a portal in a single file db, to display all the current records. What is needed correct self-join relation seperate files etc?!

The end goal is to display on-line quotes form data, (the point of the portal is to only show what's required only , more data can be viewed on another part of the layout via a calculation fields) and then to process it.

Share this post


Link to post
Share on other sites

quote:

Originally posted by synergy:

Need help! Alright is it possible to have a portal in a single file db, to display all the current records. What is needed correct self-join relation seperate files etc?!

Of course you can do this. Often times using a relationship into the same file is used in place of a find. You build everything in the same manner, you are simply not connecting to another file.

For example, say that I am looking at a record in a Contacts.fp5 database. I might want to have a portal that shows all the other contacts at the same company. I create a relationship from the Contacts.fp5 file to the Contacts.fp5 file via the CompanyID field.

Now when I am looking as Joe Smith at Acme Manufacturing, I can see a portal with all the other contacts from Acme also displayed.

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

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:FmPro@home.com

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

Share this post


Link to post
Share on other sites

Wow I didn't expect to get a reply so soon.

Well I tried to set the Quot ID to Quote ID in the Quotes.fp5, In the portal it's self I hae the following field's "quoteID,Company Name, Creation Date, ModDate" fields. The only thing that shows up is the current file?!

Part two to this is another mini portal that is suppose to display all the quotes related to the company name field, but alas this too is not yet working and only show's the current file, sometimes it will display the same record twice. Look forward to your insight!!!

Share this post


Link to post
Share on other sites

I have just finished doing a quote system following the same guidelines, except I used Portal filtering via 4 field selections.

This uses a self relation using global fields etc.

If you would like to see the example mail me at byteworks@surfer.co.nz

Share this post


Link to post
Share on other sites

Well I'm back:

OK I've tried the suggestions but still no luck, All I keep getting is the current record diplaying in the portal, and then it repeats itself once underneath.

( Quote fp5 is related to Quote fp5, via the QuoteID field) Any help would be great thanks

Share this post


Link to post
Share on other sites

quote:

Originally posted by synergy:

Well I'm back:

OK I've tried the suggestions but still no luck, All I keep getting is the current record diplaying in the portal, and then it repeats itself once underneath.

( Quote fp5 is related to Quote fp5, via the QuoteID field) Any help would be great thanks

Ok, you are getting exactly what you are asking for. Remember how stupid computers are, they give you EXACTLY what you ask for.

You are looking into the same file by a UNIQUE id field, you should only get 1 record in the portal. You need to do something like a global to the quote status or something. Say gQuoteStatus::Status.

Set gQuoteStatus to "Active" and you will see all quotes where Status = "Active". Or something like that.

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

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:FmPro@home.com

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

Share this post


Link to post
Share on other sites

A common mistake I made with self-joins originally is to mistakenly place my fields into the portal that I'd created for my self-join.

That gave me a result like you describe.

Ensure that your fields are the related fields through your self-join relationship. Example; instead of a field named "calc_state", it should be (as an example) "self_join:calc_state"

Hope this helps. I struggled over this silly mistake for over an hour when I started using portals and self-joins.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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