Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Possible to have # of rows to be only that have a record?


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

Recommended Posts

Posted

Hi,

First time poster here. I have a database with 2 tables: document-sections and requirements. Document-sections has one-to-many relationship to requirements.

I have a layout that lists the first document-section and then have a portal that lists the requirements related to that document-section. The portal row is set to 5. Can the portal be setup to only have rows if there is a record there? 

Thanks

 

portal.jpg

Posted

Portals do not dynamically resize. What is your goal? To print this as a report or to save room on the browse layout?

If it is to print, then create a print layout based on the requirements table occurrence. Place related document fields as needed. See the Invoices starter solution for an example (invoice print layout).

If it is for UI, then there are many techniques to only show related records.

Curiously, wouldn't you also need a Document table? Documents>Sections>Requirements? Or perhaps: Documents>Sections_Requirements<Requirements.

Posted
8 hours ago, BamaBino said:

Can the portal be setup to only have rows if there is a record there? 

Only in Preview mode, or when printing.

 

13 minutes ago, bcooney said:

create a print layout based on the requirements table occurrence. Place related document fields as needed.

I am afraid that would leave out the sections that do not have any requirements - such as sections 3.0 and 3.1 in the shown example.

Posted
15 minutes ago, comment said:

Only in Preview mode, or when printing.

 

I am afraid that would leave out the sections that do not have any requirements - such as sections 3.0 and 3.1 in the shown example.

Not necessarily... that's just an issue to tackle in the requirements creation.  Easy enough to create one placeholder record for each section...

Or do the report from a virtual list approach.

Posted

Good point, Comment. However, we don't know if it is a requirement to show all sections, even those without requirements. If true, I'd probably go with virtual list over a placeholder record.

Posted

Interesting.  In the example shown, it includes the section numbers.  If BamaBino didn't want the empty sections to show at all, the numbers should not appear otherwise the results would look strange.

12 hours ago, BamaBino said:

I have a layout that lists the first document-section and then have a portal that lists the requirements related to that document-section. The portal row is set to 5. Can the portal be setup to only have rows if there is a record there? 

Although we can't be sure without confirmation, it sure sounds like the section headers should be included and only the portal rows omitted.  I wouldn't create a record in a data table only as placeholder either.  Unless the need includes ability to modify the requirements while condensed, preview or print would be best recommendation.  If data must be modified in browse mode, virtual table would be viable option.

Posted (edited)

WOW. Thanks for all the replies!

13 hours ago, bcooney said:

Portals do not dynamically resize. What is your goal? To print this as a report or to save room on the browse layout?

If it is to print, then create a print layout based on the requirements table occurrence. Place related document fields as needed. See the Invoices starter solution for an example (invoice print layout).

The goal is to print a report the list the first document_section (one line) then list the requirements(if any) for that doc_section (one line of data). Then do the same for the 2nd document_section, then for all the rest of the document_sections.

Like the table below. when it was just a flat-file database.

I was using the invoices starter solution to generate what I showed earlier.

13 hours ago, bcooney said:

Curiously, wouldn't you also need a Document table? Documents>Sections>Requirements? Or perhaps: Documents>Sections_Requirements<Requirements.

I don't think so. The database is for only One document.

Table 2.jpg

9 hours ago, bcooney said:

Good point, Comment. However, we don't know if it is a requirement to show all sections, even those without requirements. If true, I'd probably go with virtual list over a placeholder record.

Yes. All sections should be shown, even those with requirements.

 

8 hours ago, LaRetta said:

Although we can't be sure without confirmation, it sure sounds like the section headers should be included and only the portal rows omitted.  I wouldn't create a record in a data table only as placeholder either.  Unless the need includes ability to modify the requirements while condensed, preview or print would be best recommendation.  If data must be modified in browse mode, virtual table would be viable option.

Yes. Only the portal rows omitted if there is not a requirement record for that portal row.

Edited by BamaBino
Posted (edited)

Another page from the listing back when the database was a flatfile when document_sections and requirements were records in the same table.

Table 3.jpg

Edited by BamaBino
Posted (edited)
23 hours ago, BamaBino said:

Can the portal be setup to only have rows if there is a record there? 

15 hours ago, comment said:

Only in Preview mode, or when printing.

2 hours ago, BamaBino said:

The goal is to print a report

See: http://www.filemaker.com/help/14/fmp/en/html/create_layout.9.67.html#1030089

--
Note: While this (sliding up)  is a very simple solution, it may not be best one - because of how portals print across page breaks. Ultimately, you may find that the best results are produced when printing from a "flat" table, where sections and their requirements are siblings. The idea is to populate such table ad hoc, either by importing or by using a "virtual table" that prints out the contents of variables.

 

 

Edited by comment
Posted

Hi BamoBino,

If you can't quite get the report output you want from FMP you can always compile HTML and output to a browser.

Here is a little example file. Hope it is close to what you are looking for. I am happy to answer questions, if needed.

Good luck to you.

ReportEx.zip

Posted
On 2/2/2016 at 6:02 PM, dwdata said:

Hi BamoBino,

If you can't quite get the report output you want from FMP you can always compile HTML and output to a browser.

Here is a little example file. Hope it is close to what you are looking for. I am happy to answer questions, if needed.

Good luck to you.

ReportEx.zip

Thank you.

 

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