FM - Converting Fields to Records?

I have a Lease Writer table and layout.  On this layout I'm trying to show the LeaseClause table.  This latter table has 1 record with 120 fields, one for each clause or paragraph.  I have these 120 fields placed on the Lease Writer layout, but now needs to put in alpha order, which would be much easier via a portal.  However, I think I would need to convert the fields into another table and have one field per record.  Each record would contain the paragraph and then if I want to sort by field, should I do a calc field that Gets the field name, if possible?  Thank you.
LVL 2
rvfowler2Asked:
Who is Participating?
 
Will LovingPresidentCommented:
Sorry, I was thinking of Set Field. There are other ways to do this, including ones that simply use "Set Field" to create a new record, but here's one simple way"

Open a separate Window
Name the Window
Set it to use the other Layout
Use Select Window [ ] to move back and forth between the two windows
.

The original layout should not loose focus on the active field.

I realize this is a one-time procedure that you're performing, but for a more elegant way of creating new records in a related table without using a portal, variables, or a separate layout or window, see this link: http://forums.filemaker.com/posts/35207dfe5d?commentId=319796#319796

It requires an extra table occurrence, but it allows you to create records in a related table simply using the Set Field [ ]  script step.
0
 
Will LovingPresidentCommented:
Create  looping script that uses Go to Field [Next] and set two Variables for: Get ( ActiveFieldName ) and Get ( ActiveFieldContents ) . Switch to a layout for your new Clause table, create a record, and then use Set Field to put the value of the variable into a "Clause Name" field and a "Clause Text" field. Then go back to the original table and loop to another Go to Field [Next]. You can use an Exit loop to stop after a certain number of fields or capture the name of the first field and Exit when that field is encountered again (meaning the loop has gone all the way through all fields and started over again).
0
 
rvfowler2Author Commented:
Almost but not quite.  When I return to the original layout, it seems to have done a CommitRecord because when it goes to the next field, it goes to the first field.  See script.  It exited out of the script which can only happen if it is in the first field.
-Capture.jpg
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
Will LovingPresidentCommented:
Well you could include a Go to Field by Name [ $FieldName ] step after returning to the layout.
0
 
rvfowler2Author Commented:
I don't see a Go To Field by Name script step (see far left of screen print), only a Go To Field and the specify for that refers to # of reps, not a field name (see again screen print).  I have FM 12.
--Capture.JPG
0
 
rvfowler2Author Commented:
The switching between windows worked though if you have tabs, it only moves through the fields that are visibly showing.  You have to click on the next tab and run it again for the other fields.  Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.