[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

FM - Creating a New Portal Row Via a Script, Part II

Posted on 2011-03-13
5
Medium Priority
?
838 Views
Last Modified: 2012-05-11
Searched EE and found nothing specifically on this.  I learned how to create a portal row when I had allowed the creation with the Relationship.  However, this time, my customers did not want to have an empty row (a portal row is only added once per year).  Is there any way to create a portal record other than navigating to the related layout and coming back (I've already done that just now)?  In FM''s script steps, I've noticed that there is a delete portal row step, but no create portal row, which would be nice.  Thanks.

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
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:North2Alaska
ID: 35127920
As far as I know, there is no create portal row method other than scripting a goto layout, set the key and back to layout.  (At least that is the way I've always done it...)
0
 
LVL 25

Accepted Solution

by:
Will Loving earned 1200 total points
ID: 35128354
N2A is correct as far as I know. You have to capture the key (ContactID, etc.) using Set Variable, go to a layout based on the table that you want to create the record in, create the record, set the key field using the variable, and then return back to the original layout, often with a "Refresh Window" step.

Set Variable [ $ContactID ; Value: <theContactID> ]
Go to Layout [ Notes ]
Create Record
Set Field [ ContactID ; $ContactID ]
Go to Layout [ original layout ]
Refresh Window [ ]

However, my preferred method here is to use one of my master scripts called "Open new window OFF-Screen", which opens a new window using Height and Length = 0 and position -200 top and -200 left. The name of the window can be generic but I use an optional script parameter to set the name of the window based on what it's doing for trouble-shooting purposes. Some people go further and set a second script parameter that includes the layout name but because layout names can change I prefer not to do that.


Set Variable [ $ContactID ; Value: <theContactID> ]
Perform Script [ Open Window OFF-screen ; Parameter: "Add Note record" ]
Go to Layout [ Notes ]
Create Record
Set Field [ ContactID ; $ContactID ]
Close Window
Refresh Window [ ]

If your portal is sorted by something other than creation date descending, so the most recent record is always on top, you can get your new record to sort to the top by doing the following:

1. Create a calc field in the related table that checks to see if a field the user would ALWAYS fill in is filled and if so set that calc result to 1.

2. Set your sort order for the relationship from the primary table to the child table to include that calc field as the first sort value. That way, if the field is empty, that record will always sort to the top. The Refresh Window [] step is essential to getting the portal to sort properly if you use this method and sometimes a Commit Record step as well.
0
 
LVL 12

Assisted Solution

by:North2Alaska
North2Alaska earned 800 total points
ID: 35128521
I stand corrected.  I did a little research and found a example of creating a related record without having to go to the layout.  I found the reference in this Thread.  There is a comment made by Bruce Robertson close to the end of the thread that points to an example at Download Example

It is a very clever method that uses global fields and multiple relationships (some with the Allow creation of records checked but not displayed.)  Very nice and I have a couple of places I can use this method.

Time to go to work and implement this idea...  :-)
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 35128598
I recall now seeing this method many years ago but it was not nearly so well-delineated. The only (minor) downside is the proliferation of relationships solely for creating records. Thanks for posting the link.
0
 
LVL 2

Author Closing Comment

by:rvfowler2
ID: 35129626
Thanks.  For me personally, I prefer to not create all the extra relationships, etc., just to avoid going to a layout.  Was hoping for something simple.  Following is how I did it and it works fine.  It is also so fast that you don't even see it going to the next layout.  However, thanks for all the research and info.  Valuable.  Will, I'm going to have to research this master script idea that you keep talking about.  Know nothing about that.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
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 …

649 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