Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Set field without target does not work

Featured Replies

I have a container field that I want to set to a global variable which is an image. I would like to go to the object name of the field and set it without checking the "Specifying target field" checkbox.

This works - If I set the field and check the "Specifying target field" checkbox.

Example (one line of code):

Set Field [TimeEntry::ContainerField; $$GlobalImage]

This method works for both text fields and container fields.

This does not work - I give the field an object name. Then I go to that object and set the field without checking the "Specifying target field" checkbox.

Example (two lines of code):

Go to Object [Object Name: "ContainerFieldObject"]

Set Field [$$GlobalImage]

This method gives me an error message #102 - Field is missing.

This method works for text fields and not for container fields.

Any ideas?

Setting field by indirection is available in FMP10.

  • Author

I am using FM 10 Advanced. Can you give me the magic words?

Look into Set Field by Name []

Also you want want to read this thread.

http://forum-en.filemaker.com/fm/board/message?board.id=FM-en-4&message.id=13841#M13841

  • Author

"Set Field by Name" expects Text and as I have found out -" Set Field" without a target field requires text as well. The only way I know how to set a container field is with "Set Field" using a target field.

Any other ideas on how to go to an object and replace the object field and not use "Set Field"?

Can you provide exact steps to reproduce this issue? I have just now tried the following script:

Set Variable [ $v; Value:Table::Containerfield ]

Go to Record/Request/Page [ Next ]

Go to Object [ Object Name: "container" ]

Set Field [ $v ]

I have tested this with the source record containing both an embedded image and a referenced one - and in both cases it worked without a problem.

While you have made an interesting observation, which could qualify as "inconsequent" the frame around an image defined as an object isn't the same as the boundaries around a textfield interessting indeed ....however isn't this quite true:

The only way I know how to set a container field is with "Set Field" using a target field.

Take a look at the above shown scripting...

--sd

insertimage.jpg

the frame around an image defined as an object isn't the same as the boundaries around a textfield

Not sure what that means. I believe that selecting a field object by Go to Field[] produces EXACTLY THE SAME SELECTION as Go to Object[] does.

  • Author

You are right.

I created a new file and tried similar code and it worked with an image from one container field copied to another container field. Now I will try to trace the problem down in my real file.

I guess I gave up because of what I read (after I started this post) in the "Missing Manual" for Filemaker 10 on page 534:

"(The current field method works only with text results; otherwise, you have to specify the field so FileMaker knows what type you have in mind.)

I will report back if I find the problem. In the meantime, if anyone has some suggestion, please let me know.

Thanks.

it worked with an image from one container field copied to another container field.

Well that can only be referenced documents then, storing redunant is not fully embrased : :

--sd

  • Author

While I could accomplish what I sought by using your advice, it appears that my real world situation causes problems and has made me resort to naming the fields (which means more code, but it works without any mysterious things happening). What may be complicating the situation is that the container field also acts as a button and executes a script.

There is at least one mysterious thing that happens with this combination of of circumstances. See my next post for details.

  • 4 weeks later...

What may be complicating the situation is that the container field also acts as a button and executes a script.

That's EXACTLY it actually. The object you named was the button, not the field. Therefore your script goes to the button but can not enter it as a field. To fix this, remove the button action (you will see the field object now has no name), name the field object, re-apply the button action.

Cheers!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.