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 5027 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Here's the scenario. I have an item database that has the tables ITEM and POTENTIALITEMS. There is a button on the POTENTIALITEMS layout that will turn a potential item into an item.

This isn't so much a problem as it is an annoyance. The fields from POTENTIALITEMS need to be copies to ITEMS, but the layouts are not identical. This prevents me from using the "Go to Next Field" script step. Also, I'd like to avoid having a column of 40 - 50 "Set Field" steps on there.

What I really want to do is have a simple variable in my script with a Carriage-return seperated list of the fields that need to be filled, in order (e.g. itemnum¶description¶upc¶weight, etc...). Then, I would have a MiddleValues Script step simply pull out what field it needs to go to next, so it would be something like

Set Field[ MiddleValues ( $fieldlist ; $iteration ; 1 ) ; $thatFieldsValue]

The problem is that I can't figure out how to go to a specific field by calculation. I've tried naming the fields in the Object Info, but I doesn't seem like I can select the field itself. Is this even possible? Thanks.

Posted

It's not possible to specify the target field for Set Field[] by calculation.

Go to Next Field[] goes to the next field in the layout's order tab order - and you can change the tab order.

Go to Object[] CAN select a field, and if followed by Set Field[] with no target field specified, the currently active field will be set.

Or you could just import your potential item into the Items table. Or keep them in the same table and just toggle a status field.

  • 2 years later...
  • Newbies
Posted

It's not possible to specify the target field for Set Field[] by calculation.

Go to Next Field[] goes to the next field in the layout's order tab order - and you can change the tab order.

Go to Object[] CAN select a field, and if followed by Set Field[] with no target field specified, the currently active field will be set.

Or you could just import your potential item into the Items table. Or keep them in the same table and just toggle a status field.

FYI, using Set Field[] with no target field specified does NOT work; it returns an error 5, "Command is invalid (for example, a Set Field script step does not have a calculation specified."

It sure would be nice to calculate the field name... It's allowed elsewhere, I don't understand why FM is inconsistent like that.

Posted

FYI, using Set Field[] with no target field specified does NOT work; it returns an error 5

I am afraid you are very much mistaken about this:

"If no field is specified and a field is selected in Browse mode or Find mode, that field is used."

http://www.filemaker.com/11help/html/scripts_ref1.36.39.html#1029024

If no field is specified and no field is selected, the error returned will be 102 (Field is missing).

It sure would be nice to calculate the field name...

This is an old thread, dating before version 10 (January 2009) introduced the Set Field By Name[] script step.

Posted

Here's the scenario. I have an item database that has the tables ITEM and POTENTIALITEMS. There is a button on the POTENTIALITEMS layout that will turn a potential item into an item.

This isn't so much a problem as it is an annoyance. The fields from POTENTIALITEMS need to be copies to ITEMS, but the layouts are not identical. This prevents me from using the "Go to Next Field" script step. Also, I'd like to avoid having a column of 40 - 50 "Set Field" steps on there.

What I really want to do is have a simple variable in my script with a Carriage-return seperated list of the fields that need to be filled, in order (e.g. itemnum¶description¶upc¶weight, etc...). Then, I would have a MiddleValues Script step simply pull out what field it needs to go to next, so it would be something like

Set Field[ MiddleValues ( $fieldlist ; $iteration ; 1 ) ; $thatFieldsValue]

The problem is that I can't figure out how to go to a specific field by calculation. I've tried naming the fields in the Object Info, but I doesn't seem like I can select the field itself. Is this even possible? Thanks.

Easy with AppleScript.

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