Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted (edited)

The Set Next Serial Value script step has two items in the Options section. One item is for selecting the field whose auto-enter serial number you wish to set aka the target field and the other is for specifying the number you wish to set it to....

The item that is for selecting the target field has a checkbox which, to me, indicates that it's optional to specify the target field. This is true of other steps such as the Set Field script step. If you don't specify a target field, the current field will be effected by the Set Field step.

So, with that logic, I would expect that if you don't specify a target field in the options for the Set Next Serial Value script step, the current field will be effected by the Set Next Serial Value step. I can't seem to get it to function like that.

Why would I want to do that? Whenever a new customer purchases our product I want to have all the ID(auto-enter serial values) fields from all the tables in the solution reset. So, my thought was to create a layout that has all of the ID fields from all the tables in my solution and loop through them resetting the auto-enter serial values in each field.

Anyone have ideas?

Edited by Guest
Grammar problems
Posted

Alright a wrapper or a functionalized script, but why wouldn't you be better off having two parallel TO's to the same table where only one have "Allow creation..." turned on.

I guess that this is meant to be a prevention of dangling portals - exhibiting lack of esthetics??

With a bit of luck could it be that you have access to ... where you on page 478 can see a recipee. Ender have made something to the essence of this technique - somewhere in these forums downloads.

--sd

Posted

Thanks for the reply Soren. I don't have the book you included a link to though I could probably purchase it.

Alright a wrapper or a functionalized script, but why wouldn't you be better off having two parallel TO's to the same table where only one have "Allow creation..." turned on.

I am not clear how this would help with the problem. Can you give me some more details?

Posted

Well My suggestion goes to a more application near approach, although there have been openings in the scripting dept. allowing features known from more procedural RAD's.

First off is it important to know if it is ugliness with that phantom record when "Allow creation of portalrows" is turned on??

Meanwhile will I see if I can find a template showing it??

--sd

Posted

Well My suggestion goes to a more application near approach, although there have been openings in the scripting dept. allowing features known from more procedural RAD's.

First off is it important to know if it is ugliness with that phantom record when "Allow creation of portalrows" is turned on??

Meanwhile will I see if I can find a template showing it??

--sd

I'm sorry Soren, I am still unclear as to the approach you have for accomplishing what I am trying to accomplish.

I am not interested in resetting the data in a field, but rather the auto-enter serial starting value in the auto-enter options in the field definition for each of the ID fields that reside in each table.

Posted

I have scated on a wrong assumtion, I appologize! Now why do you need this wrapper? Could you give more than a fling of the whole picture ...when is this functionality required, and why?

--sd

Posted (edited)

I have scated on a wrong assumtion, I appologize! Now why do you need this wrapper? Could you give more than a fling of the whole picture ...when is this functionality required, and why?

--sd

Not sure what I can add that wasn't in my original post, but here goes...

I have a file with multiple tables. In each table there is a field called ID. The ID field in each table is defined as a text field with auto-enter serial numbers.

I want auto-enter serial numbers in each ID field to start at 1 each time I install the file at a new customer site. I could go to Define> Database>Fields and go through each table and reset the auto-enter serial number starting value in the ID fields to 1.

I was thinking that instead of doing this manually, I could script it using the Set Next Serial Value script step in ScriptMaker.

Edited by Guest
Posted

ID's shouldn't be visible to the user, and the ones which however are, could be calc'field based on the the present internal ID minus initial ID value stored in a CF, but all the linking purposes should remain with the actual counting.

Whenever a new customer purchases our product

Means your piece of software, nothing particular obvious ...eventhough the grammar has been tightend. The fact that you're certified developer, doens't rule out being inhouse developer, in my humble opinion.

--sd

Posted

ID's shouldn't be visible to the user, and the ones which however are, could be calc'field based on the the present internal ID minus initial ID value stored in a CF, but all the linking purposes should remain with the actual counting.

I really appreciate you taking the time to respond to my post Soren, but I think we may be battling a bit of a language barrier here.

I don't intend for the users to ever see the IDs.

Means your piece of software, nothing particular obvious ...eventhough the grammar has been tightend. The fact that you're certified developer, doens't rule out being inhouse developer, in my humble opinion.

--sd

I am really not sure what you are trying to say here. I am an in-house developer for a vertical market company. We sell a single product created using FileMaker. I agree with you, I think, regarding being certified...being certified doesn't mean you are a certain type of developer.

Posted

I THINK that Søren is trying to say that if the ID's are not visible to the user, then it shouldn't matter if they are reset or not.

In any case, I don't see why it would be more convenient to do this in a loop on a single layout, than doing it expressly by going to a layout of each table. If you ever add a table, you will need to add its SerialID field to the reset list anyway. And since the loop method doesn't work...

I wonder if the script could live in an external file, containing only a relative reference to the real file/s.

Posted

Hi Comment.

If that's the case, then I agree with Soren. It doesn't really matter. It's just something that I want to do and I didn't know if some other users have done something like this.

I also agree with you, I could expressly script the going to each layout and doing the set next serial value. That definitely would work.

I already have a setup where each of the tables is related to a single utility table for other purposes. So, I could just add the ID field to the utility table layout and be done with it if the existing reset script looped through the fields on the layout to set next serial value.

Any way I do it, it looks like I will have to expressly define either a change to a layout or the name of the field. I love the new power and tools in FileMaker that make dynamic, modular, reusable scripting possible. This is just me attempting to make yet another dynamic script.

This topic is 6584 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.