Adding new record in a portal not as the last record
I would like to be able to add a new record line in a portal IE (sale invoice) in the next row and not as the default last record.
As you see, FileMaker only allows you to add new portal rows by clicking in the last row.
One simple way to make this easier is be to add a button that calls the script step "Go to Portal Row [Last]" (with "Select entire contents" unchecked). This will put the cursor in the first field of the last row.
There are other ways to do this that involve sorting the portal in descending order and using a script to create the child record in a way that pushes the new record to the top of the portal.
Hope that helps -- Mark Conrad aka markstar
I am not sure I Made myself clear.
what I would like to be able to do is
let say I have an Invoice with 10 Rows all filled up but I want to add an Item after the 5th line, can I do it and do you have a sample of a script that could work?
Thanks in advance
OK so what you want to do is to specify the order of the portal rows. As you may know, portal records are displayed by default in order of creation. To modify the order of related records, you can apply a sort order to either the relationship or to the portal.
So the next question is what field to sort by. You will need a field in your invoice item records for portal sort order. This can be a simple number field. If the user has access to that field, they can enter values for each portal record and thus affect the sort order.
The neatest implementation of this is to have the process scripted so that the user does not see the sort order field but just clicks a button to move a row up or down.
I will number the portal rows and than the user can change the numbers according to the order they want, and click sort button.
If you have a script example of doing it all by a click of a button I will be gratefull.
thanks a lot
Retrieving data ...