fmwebschool.com
Top Experts [learn more]Top 4-10
webko

9743 K
bandmandq

2458 K
Genx

1525 K
4. tcmeyers
5. kbata
6. Martie
7. Hammerton
8. rrenfrow
9. bneeman
10. plegler
Welcome, Guest. Please login or register.
May 23, 2013, 03:22:04 PM

Login with username, password and session length
Search:     Advanced search
FMWebschool releases more educational FMStudio webinars - check them out here:
http://www.fmwebschool.com/webinars.php
27463 Posts in 6066 Topics by 1523 Members
Latest Member: donok
* Home Help Search Calendar Login Register
+  fmwebschool.com
|-+  PHP Web Publishing Technologies
| |-+  FileMaker PHP, FX.php custom web publishing
| | |-+  FMP11 Portal Filtering using CWP custom web publishing
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: FMP11 Portal Filtering using CWP custom web publishing  (Read 1602 times)
lanclos
Newbie
*
Offline Offline

Posts: 10


« on: February 04, 2011, 09:19:33 AM »

I have a database that I am publishing to the web. In the database, I have a portal that has some portal filtering on it using FMP11. I would like to query the page using CWP and display the portal records filtered just like in FMP. Is this possible?
Logged
webko
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2050
Kudos: 9743



WWW
Applications:
« Reply #1 on: February 06, 2011, 02:36:13 PM »

Depends on your filtering criteria.

I never show portal information through the portal from Fm via Custom Publishing - you can end up with enormous unwanted data sets if you're not careful, which will make your web app run poorly...

Instead, I query to the child table directly, with whatever criteria are being used for the filter and show that data set instead...
Logged

tim.webko_at_gmail.com
bandmandq
Hero Member
*****
Offline Offline

Posts: 1045
Kudos: 2458



WWW
Applications:
« Reply #2 on: February 08, 2011, 10:30:22 AM »

Webko,

Does the number of calls on a page also effect the web page's performance?  Meaning that if I call a child table to get the filtered related data, can I also have a call to another table with info I need?  Or would that be almost as bad as calling from a portal?

I hope that makes since.
Logged
webko
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2050
Kudos: 9743



WWW
Applications:
« Reply #3 on: February 08, 2011, 02:43:04 PM »

Really, the number of queries is not a huge issue, so long as the amount of data sent back is not huge...

Example:

Let's say you have an invoice system, with one invoice and many line items.

A query for one invoice with the portal, to then show the line items and totals might seem sensible - and it probably is for one invoice. Let's also say that the query for that, and the (let's say) 10 line items would bring back 110K of data (10K for the parent, 10K for each child record)...

But I have no control over how many line items come back - an invoice might have 1 or it might have 100 line items.

If I go to the child table and perform a query, I can at least limit how many are returned from the query, and maybe have another routine if they really need to see the extra 90 line items.

There is a fraction more overhead, due to the header section of the XML and an extra database call - I think the control makes up for that, as people can't call the 100 items through the portal (which using my example, would result in about a Mb of data...)
Logged

tim.webko_at_gmail.com
lanclos
Newbie
*
Offline Offline

Posts: 10


« Reply #4 on: February 09, 2011, 06:39:25 AM »

My problem is that I have an invoice database which has an Amount - then I subtract all payments from a separate db Payments leaving me a unstored calculation called Balance Remaining. To search for invoices that have not been paid, I have to search for Balance Remaining > 0. Since this field cannot be indexed, my searches take forever. I was faster to make a filtered portal in my Clients database showing unpaid invoices and then displaying them on the web with a counter limiting the records returned. Is there a better way than this because this is not a perfect solution? Thanks
Logged
bandmandq
Hero Member
*****
Offline Offline

Posts: 1045
Kudos: 2458



WWW
Applications:
« Reply #5 on: February 09, 2011, 09:27:26 AM »

What if  you had a field in the database that say is called "status"  with the default value on creation being UNPAID.  Then when the invoice it paid in full, it gets changed to PAID.

You could then do a search for UNPAID invoices.  Could that not be indexed?  Just a thought off the top of my head.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!