Jump to content
Sign in to follow this  
Grey Loki

Sorting Portal Records?

Recommended Posts

Hi folks,

I've been playing around with FileMaker for a while, and i've just come across something that I can't figure out - it's probably a simple fix, but I just can't find any reference to it anywhere.

The database i'm working on at the moment is a stock management/invoicing jobbie - it all works well, and i'm just adding extra functionality now.

Currently, an invoice has on it all the standard details (name, address, etc etc), as well as a portal which is used to add stock from the stock table. This stock is organised by category - Audio, Visual, Computing, Hardware, and so on.

Sometimes, it might be necessary to add more stuff to an already-created invoice. This is of course possible, but currently, the categories column after adding to it would look like this:

Audio

Audio

Computing

Computing

Computing

Hardware

Audio

Audio

Now, it is time for my simple question - is there a way to sort each row in a portal based on the contents of a particular column (be it category, price, or some other field).

If it helps, i've been playing around with modifying a copy of the Business Productivity Suite that you can download from FileMaker's website.

Thanks very much in advance,

Loki.

Share this post


Link to post
Share on other sites

Hi,

You can sort data in portal in two ways. First of all define the sort criteria in relationship dialog box. There is a sort records option.

Another solution is sorting portal based, in layout. Double click the portal and select sort check box in dialog box.

It is that simple.

F. Osman Cabi

Share this post


Link to post
Share on other sites

Welcome to the forums, Loki. As Osman says, it's fairly simple to specify a single sort order. However, changing the portal sort order by clicking a column header, like you can do in table view, is not so simple. Is that what you want to do?

Share this post


Link to post
Share on other sites

Fitch - ideally, that's what i'd like to accomplish.

However, I've just looked at the second part of Osman's suggestion (double clicking a portal in layout mode and choosing the 'sort records' checkbox), and now have my records being sorted first by category, then by price, which seems to work quite well, ergonomically, and is also nice and simple!

I do have another question though, and to save starting another topic, i'll ask here:

Say I have an invoice all set up and ready, and the same customer comes in again and orders the same stuff - obviously i'll want to generate a new invoice rather than just printing off the old one again. Is there a way to copy a record over to a new invoice page?

I see in the scripts dialogue box that there are options for creating a new record (great), and copying a current record (even better!) - but there doesn't seem to be one for pasting a copied record in its entirety?

I suppose i'm just missing something in the way that FileMaker works, but i've tried running a script to remove any 'find' sorting, copying the current record, creating a new record within the correct layout, then running the 'Paste' script step, but it seems to put all of the record's information into one field. It seems I could add a paste step for each field of the new record, but that seems quite inefficient...

Is there a better way?

Thanks again for your help ;)

Loki.

Share this post


Link to post
Share on other sites

Don't copy and paste. Use "Duplicate Record/Request." Again, it's a bit more complicated because you also need to duplicate the related records, which requires either an import or a loop, depending on the technique you prefer. I'm sorry I don't have time to go into more detail right now, but perhaps someone will jump in here and point you to a good reference.

Share this post


Link to post
Share on other sites

.

.

.

I do have another question though, and to save starting another topic, i'll ask here:

Say I have an invoice all set up and ready, and the same customer comes in again and orders the same stuff - obviously i'll want to generate a new invoice rather than just printing off the old one again. Is there a way to copy a record over to a new invoice page?

I see in the scripts dialogue box that there are options for creating a new record (great), and copying a current record (even better!) - but there doesn't seem to be one for pasting a copied record in its entirety?

I suppose i'm just missing something in the way that FileMaker works, but i've tried running a script to remove any 'find' sorting, copying the current record, creating a new record within the correct layout, then running the 'Paste' script step, but it seems to put all of the record's information into one field. It seems I could add a paste step for each field of the new record, but that seems quite inefficient...

Is there a better way?

Thanks again for your help :P

Loki.

I'm too looking answer for this question.

I have table where i'm calculating quotations for customers. Currently it's done with repeating fields,

but i could use that calculated data (what items, amounts ect.) in another solutions also with relationship.

Tested this using portals a bit, but problem is: HOW to copy certain record with the portal information to a new record so that portal records are unique and editable without altering

data on orginal record.

Calculation records has relationship with CalculationRows by CalcID. These are in separate files.

Calculations are quite similar and it would be much easier to copy old record and modify that.

Only option what i see now is to go CalculationRows, manually copy those lines

related what i want to "duplicate" and give then new Calc ID.

If anyone has solution for this, i would be really nice. Trying to google info on this over week already but no help yet.

- Cat

Share this post


Link to post
Share on other sites

I didn't say it's difficult, just remembered the well-written article and didn't have time to rewrite or do a demo.

Share this post


Link to post
Share on other sites

I am sure that's what you meant, but it didn't come off that way.

Share this post


Link to post
Share on other sites

Thanks, wouldn't want to get a bad rep around here.

Share this post


Link to post
Share on other sites

So i've managed to work out all of my fancy portal sorting now, and it's all working great - thanks to the help I got here :

However, i'm looking at this database, and while records in a portal are sorted fine, records from the same table (Line Items) that are put into an invoicing layout after being added through a portal are still in the order they were originally added. There doesn't seem to be a 'sort' option anywhere on the layout - is there a way to sort this data, or am I just thinking wishfully?

Thanks again,

Loki.

Share this post


Link to post
Share on other sites

Now you're in a list view layout based on a line item table occurrence, correct? So, the sorting is handled differently here. You can:

1. Use the Records>Sort command.

2. Put a button in the header part, "Sort," that brings up the Sort dialog.

3. Have each column title be a button that sorts by that column. (Ideally, passes a script parameter to a sort script. The script sorts based on the script parameter).

Share this post


Link to post
Share on other sites

i think the post above me is the answer to the question i just now came here to ask, but if so, i'm still not clear.

i am trying to sort a portal via script buttons that i have placed at the top of each 'column', just above the portal itself. so, it's trying to mimic the behavior of a table layout. i understand how one can fix the sorting either in the relationships or in the layout, but how can this be done dynamically in browse mode?

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
Sign in to follow this  

×

Important Information

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