Jump to content

Displaying fields from relational database


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

Recommended Posts

I have yet another question. In the project I am working on I am displaying values from the main database and need to display fields that get their values from a second database. I have tried all I could think of to display them with no luck. Are you able to get these values from the main database or do you have to get them from the second one? And if so how do you change which database you are getting the values from?

Also, totally different subject. Are you able to access zip files in container fields from the web? Clueless on this one.

Thanks in advance.

Chris

Link to comment
Share on other sites

To view records listed in a portal: remember that they are in a different database to the current one, so the url that links to them must have the appropriate -db, -lay, -format and -error files specified. The [FMP-Link] CDML tag can be used for this but I find that so much changes that it's easier to build it up by hand.

Regarding zip and other binary fils in container fields: Nope. Not made for that. Best (only) way is to save the path to the file in a text field and generate a link from that data.

Link to comment
Share on other sites

The cdml reference tells you to use this code for portal information

[FMP-Portal: InvoiceID]

[FMP-Field: fieldname::relationship name] - [FMP-Field: InvoiceID::Product Count]<br>

[/FMP-Portal]

Therefore I would assume you could access the information in a related field by using

[FMP-Field: fieldname::relationship name]

I haven't used this yet so I can't be sure. Might be worth a try though

Simon

Link to comment
Share on other sites

I ment to reply earlier, but things got busy. To display relational records do you have to have them in a portal? The database I am working with does not have them in a portal. I didn't design the database, just working with it. Thanks in advance.

Chris

Link to comment
Share on other sites

  • 2 weeks later...

quote:

Originally posted by Simonpennington:

The cdml reference tells you to use this code for portal information

[FMP-Portal: InvoiceID]

[FMP-Field: fieldname::relationship name] - [FMP-Field: InvoiceID::Product Count]<br>

[/FMP-Portal]

Therefore I would assume you could access the information in a related field by using

[FMP-Field: fieldname::relationship name]

I haven't used this yet so I can't be sure. Might be worth a try though

Simon

You got it backwards. It's

[FMP-Field: relationshipname::fieldname]

I tried it. it works just fine with out the portal tag. Of course that is with a 1 to 1 relationship.

Link to comment
Share on other sites

This topic is 8602 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.