Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4366 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted
 
 

I have a large file that contains numbers from a previous import

The problem is that I would like to fill in the field of the next record with the previous number until the number changes

How can I make a calculation that keeps pasting the new number into the next record same field only until the number changes and then starts pasting that number?

 

Field is called "NumberV"

thank you

Posted

If you make this field a calculation field you won't be able to edit ever. Make it an auto-enter. Look this up in help.

Posted

I need more info. "A large file" what does that mean? A table with "a lot" of records? "Fill in the field" which field? With a value from "the previous record" - how is that determined, creation order?

 

Please provide the business logic here and perhaps the workflow. To throw techniques out to you isn't necessarily helpful.

Posted
 
 

post-81925-0-09265800-1360074188_thumb.jYes it is a very large file. The Bible in text form. Each verse has a chapter and verse. But there is only a chapter number at the first import of that chapter. I have included a screen shot of this. 

The only way for me to fill in the blanks is to make a script that inserts a calculated result. The whole thing 35000 records, could be automated to fill in the chapter with the proper number and keep inserting that number until the number changes.   This is needed because you have a verse like Matthew 18:19 and Matthew 18:20 etc. All the verses have the accurate numbers but the chapter number only happens at the beginning of a whole bunch of verses. But if a user is looking up a chapter and verse later it will require the chapter field to hold the correct chapter. I think the attachment will illustrate this. The second attachment show the empty fields I have to continue adding the chapter number to. 

 
 

post-81925-0-90588700-1360076255_thumb.j

Posted

Each row should have a chapter and verse number (and bookID)? I wouldn't solve this in FM. I'd solve it in the source file or the mechanism that builds it.

Posted

If it's difficult to accomplish this in the source file, it can easily be done in FileMaker with a script that loops through the found set and is run after import...

 

Freeze Window  // important for performance reasons
Go To Record[First]
Loop
    If [IsEmpty(Chapter) and Get(RecordNumber) > 1]
        Insert from last record[Chapter]
    End If
    Go To Record[Next; Exit After Last]
End Loop

 

I would also recommend deleting blank records and chapter heading records. If you keep these in the database you are not using your database like a database, you are using it like a spreadsheet. You can re-create these headers via a sub-summary part, if they are needed.

This topic is 4366 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.