开发者

Button-Triggered Insert File Only Works If Portal Contains Edit Box for Container Field

I'm working with a FileMaker Pro 11 database that contains a portal. I've added an "attach file" button 开发者_JAVA技巧to the portal which triggers a simple "Insert File[portal_table::attachment_field]" script. When I click on the button, I would expect an insert file dialog box to appear. Instead, nothing happens.

If I add a text box to the portal, setting the text box's field to portal_table::attachment_field, the attach button starts working.

Why am I required to add this text box to the portal in order for my button-triggered script to work? Is there a way I can modify my script so that it works without requiring the text box's presence?

Thank you,

Ben


Generally speaking FileMaker's "Insert..." commands behave as if a user has done an action manually (activating script triggers, selecting the field, etc.) including the requirement that the field actually be displayed on the screen.

Unfortunately, as far as I am aware, there is not a way to use "Set Field" to specify a file to be added to a container field. One possible work-around is the following:

Freeze Window
Set Variable [$RecordIndex to RelatedTable::Index]
Go to Layout [A Layout of RelatedTable specifically for inserting files]
Enter Find Mode
Set Field [Index to $RecordIndex]
Perform Find
Insert File
Go to Layout [Original Layout]

Alternately, it may be easier to just include the field on the layout at a very small size (1 pixel x 1 pixel).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜