Jump to content
Server Maintenance This Week. ×

php filtered portal


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

Recommended Posts

  • Newbies

Does anyone know how to do this?

I've found the same articles telling me about setRelatedSetsFilters() and getRelatedSetsFilters(), but i haven't found any examples. So i have no idea how to implement it.

I have a page, that will be displayed on a large plasma. On it is 10 portals all pulling from the same child table. Each portal shows projects in a different stage. IWP doesn't work, it just shows all the records in each of the 10 portals. If 10 is too ridiculous, i'll settle for 1 and just use iframes or something.

Any thoughts?

Thanks!!

Link to comment
Share on other sites

Have you tried to implement, but gotten stuck? If so, where are you stuck at?

Does your layout use filtered portals?

I haven't used filters on portals via CWP, but a look at the documentation show's that the setRelatedSetsFilters() method allows you to ignore layout-applied filters, and return sub-sets of data from the entire found set of portal records.

(The documentation I am referring to can be found here on your FileMaker Server Advanced system: http://localhost:16000/docs/PHP%20API%20Documentation/index.html)

My assumption is that you just need to learn how to retrieve records from a portal in general. The basic method for this involves getting a record object for each portal, then iterating over each record in the portal...


// build find command here

$result = $findCommand->execute()

// test for error here

$records = $result->getRecords();

$record = $records[0];  // get first found record

$portalRecords = $record->getRelatedSet('portalA');

foreach ($portalRecords as $portalRecord){

    $data[] = $portalRecord->getField('firstPortalField');

}

// this code would retrieve all the data from 'firstPortalField',

// from the portal based on TO 'portalA', from the first record in the found set

Link to comment
Share on other sites

  • Newbies

Hi, my layout in Filemaker uses filtered portals. I've been doing research and from what i can tell, this method would only be applied at the presentation layer. So it would still pull all related dated from the server, then just hide the unwanted stuff. In the end, I just used (a ton of) multi-criteria relationships to "filter" "portals" at the data layer. The end result is the same, but less overhead. Thank you for your response!

Link to comment
Share on other sites

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