I have a button on my form that brings up @picklist with a small view from
another database. The only thing that seems to work is that the modal box
appears. I would like the user to select one document in the modal view,
and have the contents of 3 fields be transferred to 3 fields on the current
form.
I can't even get the selected document to transfer a value from a single
column to the selected field.
Thanks in advance
EddieZ
FIELD Category:=Category; @SetField( "Category"; @PickList( [Custom] :
[Single] ; @DbName ; "MyView" ; "Select Category" ; "Either pick from list
and click OK, or type value directly in Category field." ; 1 ))
* Category is the field on the form which receives the selected value. *
Before using @SetField, I declared the field, Category, using the FIELD
assignment formula: FIELD Fieldname:=Fieldname; * The @SetField formula
states that the value selected from @PickList should be posted to the
Category field. * Only one value [Single] from the first column (1) of MyView
in the current database may be selected. Omit [Single] if end-user can
select more than one item from list. Multiple items will post to the same
field. If so, make sure field properties are set to accept multi-value
items. Replace @DbName with server:file name.
If you succeed using this formula to enable the end-user to post the first
field value, experiment with @DbLookup to locate the selected document and
post the remaining column values to the other two fields on your form. I
hope this helps. L. ******************************************* In article
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>I may be using the wrong command, but here is what I'm trying to do...
>
>I have a button on my form that brings up @picklist with a small view from
>another database. The only thing that seems to work is that the modal box
>appears. I would like the user to select one document in the modal view,
>and have the contents of 3 fields be transferred to 3 fields on the current
>form.
>
>I can't even get the selected document to transfer a value from a single
>column to the selected field.
>
I use the following to do that:
Rem "Set up the parameters"
DBName := @Text(@DbName);
Server := @Subset(DBName; 1);
View :="(Hidden View)";
Title := "Title";
Prompt := "Prompt";
Rem "Get the user imput"
FIELD SSN := @PickList( [Custom] : [Single] ; Server : "" ; View ; _
Title ; Prompt ; 4 );
Database := "database.nsf" ;
ClassCache := "Notes" : "NoCache";
Rem "Use that input to get new values"
@Set ("View"; "(Full Info by SSN)" );
Key := SSN;
Col := 2;
FIELD FullName := @DbLookup(ClassCache ; Server : Database ; View ;
Key; Col) ;
@Set ( "Col"; 3 );
FIELD HomePhone := @DbLookup( ClassCache ; Server : Database ; View ;
Key; Col ) ;
@Set ( "Col"; 5 );
FIELD Company := @DbLookup( ClassCache ; Server : Database ; View ;
Key; Col ) ;
""
Matt Silberstein
-------------------------------------------------------
The Killing, Paths of Glory, Spartacus, Lolita, Dr Strangelove,
2001: A Space Odyssey, A Clockwork Orange, Barry Lyndon,
The Shinning, Full Metal Jacket, and, last of all, but I hope
not the least, Eyes Wide Shut. I will miss him.
Either that or you could use script which would probably simplify the
process.
EddieZ <Edd...@Bigfoot.com> wrote in message
news:7f65np$2...@newsops.execpc.com...
> I may be using the wrong command, but here is what I'm trying to do...
>
> I have a button on my form that brings up @picklist with a small view from
> another database. The only thing that seems to work is that the modal box
> appears. I would like the user to select one document in the modal view,
> and have the contents of 3 fields be transferred to 3 fields on the
current
> form.
>
> I can't even get the selected document to transfer a value from a single
> column to the selected field.
>
> Thanks in advance
> EddieZ
>
>
Choice:=@PickList( [Custom] ; server : file ; view ; title ; prompt ;
column);
Field FieldNo1:=@Word(Choise; "#@"; 1);
Field FieldNo2:=@Word(Choise; "#@"; 2);
Field FieldNo3:=@Word(Choise; "#@"; 3)
I think this returns an error when saving, but adding another line like
@Success
or
@Return("")
should deal with that.
If one of the fields is multi value you could think of another unique
separator (e.g. "#$") and @Explode the result of @Word, e.g.:
Field FieldNo2:=@Explode( @Word(Choise; "#@"; 2); "#$" );
Success!
Ralph Kersten
EddieZ heeft geschreven in bericht <7f65np$2...@newsops.execpc.com>...
Thanks
EddieZ
EddieZ <Edd...@Bigfoot.com> wrote in message
news:7f65np$2...@newsops.execpc.com...