[comp.databases] 4D assistance requested - passing params to global subrtns

pazandak@umn-cs.cs.umn.edu (Paul Pazandak) (03/30/91)

Hello,

I have a (hopefully) easy question regarding the passing of filenames
to subroutines in 4D.  I asked Acius Technical Support, but they were
only partially correct, and turn around time on a call is at least a day.
(I can't stay by my phone all of the time.)

Problem:

I want to create a simple duplicate record subroutine (global).  So, from
each button within a layout (a "Duplicate Record" button) I want to pass
the file name or number to a global Subroutine which would then do its
thing.

The problem I am having is in the global sr. First, I must check that the 
selection in that file is 1, so I have this:

    If (Records in selection(Filename($1)) = 1) ...

4D always highlights the 2nd to last cursor and blurps out
"I expected  or a file".  I have done this long ago, but do not remember
anymore. HOW CAN I DO THIS EXTREMELY EASY & VERY IRRITATING THING!  The
manuals are very poor in examples of this nature...


Thanks for all help!

pazandak@umn-cs.cs.umn.edu