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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Will LovingPresident, Dedication Technologies, Inc.Commented:
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
Will LovingPresident, Dedication Technologies, Inc.Commented:
Well you could include a Go to Field by Name [ $FieldName ] step after returning to the layout.
0
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

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
Will LovingPresident, Dedication Technologies, Inc.Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FileMaker Pro

From novice to tech pro — start learning today.