Jump to content

Portal's and self-joins in single file?


synergy

This topic is 8404 days old. Please don't post here. Open a new topic instead.

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.

Link to comment
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:[email protected]

http://www.database-resources.com

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

Link to comment
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!!!

Link to comment
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

Link to comment
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:[email protected]

http://www.database-resources.com

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

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
Share on other sites

This topic is 8404 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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