Solved

FM - New Portal Row at the Top?

Posted on 2011-09-12
13
1,162 Views
Last Modified: 2012-05-12
Searched EE knowledebase and found nothing.  Before I bang away a this, anyone know how to put the new portal row so it shows at the top?  Specifically, I have a separate Notes table and have brought it in via a portal.  Sometimes we can have enough notes to drop the new row below the bottom of the portal display.  I supposed I could have a button that takes them to the blank field, but any way to sort it to the top?
0
Comment
Question by:rvfowler2
  • 6
  • 6
13 Comments
 
LVL 12

Assisted Solution

by:North2Alaska
North2Alaska earned 100 total points
Comment Utility
To insure that it is alway at the top, you have to do a little juggling.  You can simply turn on sorting for the portal ( I usually capture the date it was created and then sort it ascending) but when you create the row using the "Create related records option, it seems always to be at the bottom.  So, here is what I do.  I have a script that creates the related row, saves it and then lets the sort order place it where it needs to be.  Finally, set the current row to the newly created one.
0
 
LVL 24

Accepted Solution

by:
Will Loving earned 400 total points
Comment Utility
FileMaker does not include a setting that allows for this but you can force it by creating a "New" button and script and by having your portal sorted in Descending order by either the Record ID for the Notes record or by Creation Date and Time.

You script should include the following steps (and I'll just note that there are ways to make this more compact with additional structure, but this is a simple, direct method):

Set Variable [$Customer ID ; Customers::CustomerID]
Go to Layout [ some layout based on the Notes table ]
New Record
Set Field [ Notes::CustomerID ; $CustomerID ]
Commit Records/Requests [Skip Validation ; No Dialog]
Go to Layout [Original Layout]
Refresh Window
Go to field [ Notes::NoteText ]

This works ONLY if your portal or portal relationship is set to sort Descending by Creation Date/Time (or TimeStamp, or Notes RecordID/Serial Number). The Refresh is generally necessary to force the new record to appear in the correct sort order and for the last step you can either use Go To Field or Go To Object if the field is a named object.

If you use this setup you should turn OFF the "Allow creation of new records.." option in the Customer to Notes relationship to force users to just use the "New" button. If you want to get fancy you can add the Customer ID of the current record as a script parameter to the "New" Button, then instead of creating  the variable, you just use Get ( ScriptParameter ) on the Notes layout.

0
 
LVL 2

Author Comment

by:rvfowler2
Comment Utility
First, I do sort by descending order so the latest is always on top.  Second, I have a couple of variables I need to pass:  sales agent ID, data entry ID, and recID for the foreign key.  Currently this happens with autoentry fields.  What about the best of both worlds?  Could I just have the New button take me to the bottom and add a space, then commit the record (I tested it; it then shows up at the top), then Go to Field [Notes::NotesText], which is set to highlight the entire field, then delete the space?  I could even freeze the window and unfreeze it so the user does not see what is happening until it is over.  Or... in your experience, would having a row and a button to create a new field just confuse the user?
-NotesNew.JPG
0
 
LVL 24

Expert Comment

by:Will Loving
Comment Utility
Yes, you sort by descending order to the newest is on the top. The technique you are describing of adding a space, Committing the record and then using Go to Field should also work. Freeze window can also help reduce 'flashing' for  the end user. You may or may not need a Refresh Window.

I do think that you should not have both a "New" button and the open row at the bottom as well as it can be confusing. Consistent interface is always helpful. Turn off the "Allow Creation of New Records..." in the relationship to get rid of the row.
0
 
LVL 24

Assisted Solution

by:Will Loving
Will Loving earned 400 total points
Comment Utility
I would also put the new button at the top of the portal since having it within the portal at the bottom means that if you have more notes than you have portal rows it won't be visible. A simple green "Plus" with a Tooltip that say "Click here to create a new NOte" will usually do.

With regard to the additional variables, you can either pass them to the script as a carriage return separated set of script parameters and then use GetValue( Get ( ScriptParameter ) ; 1 )  to enter them in the Notes record (using my previous script example).

Another way to gain some space is to change your Y/N radio button to a Y checkbox.
0
 
LVL 2

Author Comment

by:rvfowler2
Comment Utility
So, you mean that you can use GetValue ( Get ( ScriptParameter ) ; 1 ) to get the first parameter when it is delineated by a carriage return and then GetValue( Get ( ScriptParameter ) ; 2) for the second one?  So below, 1 above would return LC and 2 above would return GM?  If so, very cool; didn't know that.  

LC
GM
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 2

Author Comment

by:rvfowler2
Comment Utility
Also, dumb question.  How do you get a plus sign to show up without taking up so much space as happens when you use text (the vertical borders are so high).  Do you just paste it into a jpg file and insert it as a picture?
0
 
LVL 24

Expert Comment

by:Will Loving
Comment Utility
Correct on the usage of GetValue() and I'll give you an even more clever version later that uses a Custom Function to allow you to name variables and put them in any order you want.

Use a graphic image. I'll post an images file with some nice pngs you can use.
0
 
LVL 2

Author Comment

by:rvfowler2
Comment Utility
OK.  I tried Photoshop, but kept getting a white backgound, so used two 3pt lines as a + sign for now.  New at this symbol business.
0
 
LVL 24

Assisted Solution

by:Will Loving
Will Loving earned 400 total points
Comment Utility
This file contains a large number of open source icons. The source is listed for each icon. If you use the icon in a distributed product, commercial or otherwise, you need to credit the author and include the Open Source license agreement which can be found on the web with the icon library.
Icons.fp7.zip
0
 
LVL 24

Assisted Solution

by:Will Loving
Will Loving earned 400 total points
Comment Utility
Using FileMaker drawing elements is a good way to create simple graphics. It has the advantage of displaying faster than a JPEG or PNG image, though with something that small it won't make much of a difference. if you are using a background that is different that the background of the graphic, you may wish to either put the graphic on top of a rectangle or oval to give it a button appearance, or edit the graphic in Photoshop or some other program to make the background transparent. Note that JPEGs can't have transparent backgrounds, so use PNG or GIF format.
0
 
LVL 2

Author Comment

by:rvfowler2
Comment Utility
Turns out that I didn't need the elegant way you passed through multiple parameters.  I just passed through the one RecID for a foreign key and made all the others auto-enter and it worked.  Second, seems the refresh window causes a slight delay in the script so took it out, and I gave the Notes field a Ojbect name of NotesEntry and used the GotoObject, which defaulted to the first row (so didn't need a GotoPortalrow before this).  And, Will, did use your plus icon.  Thanks.  Thanks to all.
0
 
LVL 2

Author Closing Comment

by:rvfowler2
Comment Utility
Thanks, and Will, even though I didn't use the multiple parameters pass through solution this time, definitely will in the future.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now