Jump to content
muskee

Exporting data in a portal

Recommended Posts

muskee    1

Hi guys!
I'm having problems when exporting the data inside a portal, there are two portals on the layout but only one is viewable and the other is hidden, the portal that I want to export also has a filter . I'm using the export records option found in filemaker pro 14.

This is the portal (it's in spanish):
portal.PNG

this is the export (I put the field names in english):

 

excel.PNG

Edited by muskee
  • Like 1

Share this post


Link to post
Share on other sites
rwoods    9

Hi Muskee

Sorry, but I can't access your enclosure, it's just a question mark. And also, you don't actually ask us a question. What specifically is your question?

Without seeing the file I'm not sure, but bear in mind that the 'Filter' applied to a portal is 'cosmetic' and doesn't alter which records are matched by that relationship. All the records that match that relationship would be exported, not just the ones that are shown by the filter.

Let us see the file and know what your question is and we can help more.

Share this post


Link to post
Share on other sites
muskee    1

Hi, can you reload and see? @rwoods 

The question is that the information found in my portal is incomplete in my export excel >_<

Share this post


Link to post
Share on other sites
Wim Decorte    456

The typical and most reliable approach is not export from the context of the portal's parent but to go to a layout of the portal records and export from there.

What is incomplete about the current export?

Share this post


Link to post
Share on other sites
muskee    1
4 minutes ago, Wim Decorte said:

What is incomplete about the current export?

Ok, look at the excel picture, the first 4 columns are missing information. Apparently the information is grouped so no information is repeated

Share this post


Link to post
Share on other sites
comment    1,392

As Wim said, if you want your export to have parent data in every row, export from the child table and include the parent fields in the field export order.

Share this post


Link to post
Share on other sites
muskee    1

Ok I got you,
But now I don't know how to get the data I need.

What I did was to show in the portal the related records the parent table had with the child table

If I'm in the child table, I need to see all the records related to the parent table. If I do the portal in the child table, how can I see all the records that are related to the same parent? the relationship is based on parent table ID --> child table ID FK

Share this post


Link to post
Share on other sites
Wim Decorte    456

You don't do a portal in the child table.  From the parent you do a 'go to related' to the child table.  That will give you the found set of children.  You do the export based on that found set and you can include related parent fields.

Share this post


Link to post
Share on other sites
comment    1,392
2 hours ago, muskee said:

I need to see all the records related to the parent table

As Wim said, it's easy to get them using the Go to Related Record script step. However, in your original post you said that the portal is filtered. You would have to further constrain the found set to replicate the effect of the filter.

Share this post


Link to post
Share on other sites
LaRetta    482
1 hour ago, comment said:

As Wim said, it's easy to get them using the Go to Related Record script step. However, in your original post you said that the portal is filtered. You would have to further constrain the found set to replicate the effect of the filter.

Another option is to object name a field in that filtered portal and use 'Go To Object [ 'thatName' ] immediately before your Go To Related Record[] step.  This will apply the filter you've specified.

Actually I just realized that issuing a Go To Portal Row [ first ] before the GTRR does the same thing!  Object naming the portal doesn't work however.  Since you have two portals on the layout, you would need to make sure the filtered portal is FIRST in stacking order.  To be safe, it is probably better to use object name.

Edited by LaRetta

Share this post


Link to post
Share on other sites
comment    1,392
19 minutes ago, LaRetta said:

This will apply the filter you've specified.

Wow. This is not only undocumented - it is in direct contradiction of the documentation:

Quote

• If you are filtering records in a portal, this script step exposes all of the records, not just the filtered records.

 

 

Share this post


Link to post
Share on other sites
muskee    1
On 7/12/2016 at 1:39 PM, LaRetta said:

Another option is to object name a field in that filtered portal and use 'Go To Object [ 'thatName' ] immediately before your Go To Related Record[] step.  This will apply the filter you've specified.

I didn't understand!
I have my filtered portal in the parent table. There is a field inside the filtered portal called Credits, so let's object name the field to objCredtis. so if I make a script:
Go To Object [ 'objCredtis' ]
Go to related records [Show only related records; From table: "Child table"; using layout <Current Layout>]
export records[no dialog]

this should work?

Actually I just realized that issuing a Go To Portal Row [ first ] before the GTRR does the same thing!  Object naming the portal doesn't work however.  Since you have two portals on the layout, you would need to make sure the filtered portal is FIRST in stacking order.  To be safe, it is probably better to use object name.

With the same filtered portal, If I do a script:
Go to Portal row [first]
Go to related records [Show only related records; From table: "Child table"; using layout <Current Layout>]
export records[no dialog]

 

Sooo both methods should work? or am I lost? :v

 

Share this post


Link to post
Share on other sites
BruceR    154

Using <current layout> is the problem.

You need to go to a layout based on the Child table.

Share this post


Link to post
Share on other sites

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


×

Important Information

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