Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

FM - New Portal Row at the Top?

Posted on 2011-09-12
13
Medium Priority
?
1,235 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
13 Comments
 
LVL 12

Assisted Solution

by:North2Alaska
North2Alaska earned 400 total points
ID: 36525221
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 25

Accepted Solution

by:
Will Loving earned 1600 total points
ID: 36525295
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
ID: 36525511
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 25

Expert Comment

by:Will Loving
ID: 36525569
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 25

Assisted Solution

by:Will Loving
Will Loving earned 1600 total points
ID: 36525598
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
ID: 36525658
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
 
LVL 2

Author Comment

by:rvfowler2
ID: 36525732
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 25

Expert Comment

by:Will Loving
ID: 36525898
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
ID: 36525917
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 25

Assisted Solution

by:Will Loving
Will Loving earned 1600 total points
ID: 36525945
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 25

Assisted Solution

by:Will Loving
Will Loving earned 1600 total points
ID: 36526009
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
ID: 36526266
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
ID: 36526283
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

610 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