Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BIG problem with @Picklist

0 views
Skip to first unread message

Carsten Suurland

unread,
Aug 5, 1999, 3:00:00 AM8/5/99
to
Hi there...

I've run into a major problem that I cant find a way out of!

On a form, I've got three buttons. Each of these buttons perform a @Picklist
lookup.... Each in its own database...

The problem is this:
All three buttons either display the SAME picklist, OR I get an "Entry not
in design list" error???

I'm 100% sure that I'me telling the @Picklist functions to look in different
databases...

Just in case.... here are the @Functions...

Button 1:
_strUNID := @PickList( [Custom] : [Single] ; @Name([CN]; @DbName) :
"PRODCAT_Products.nsf" ; "(ALL)" ; "Substitute" ; "Select the product to
substitute."; 1 );

Button 2:
_strUNID := @PickList( [Custom] : [Single] ; @Name([CN]; @DbName) :
"PRODCAT_Approvals.nsf" ; "(ALLAPPROVALS)" ; "Approval" ; "Select an
approval for this product."; 1 );

Button 3:
_strUNID := @PickList( [Custom] : [Single] ; @Name([CN]; @DbName) :
"PRODCAT_Guides" ; "(ALLASSEMBLY)" ; "Assemply Guides" ; "Select an
assemblyguide for this product."; 1 );

Could you please help me? I'm getting desperat!

Regards
Carsten Suurland


Michael Insberg

unread,
Aug 9, 1999, 3:00:00 AM8/9/99
to
Hi

try this:

db_name:=@Text(@Environment("db_name"));
db_view:=@Text(@Environment("view_name"));
field_name:=@Text(@Environment("field_name"));
pick_title:=@Text(@Environment("title"));
message:=@Text(@Environment("message"));

SubDir:=@LeftBack(@Subset(@DbName;-1);"\\");
database_name:=@If(SubDir="";"";SubDir+"\\") + db_name;
Choice:=@PickList([Custom];@Subset(@DbName;1):database_name; db_view
;pick_title ;message;1);
Chosen_Customer:=@Subset(Choice;1);

@If(!@IsAvailable(field_name);"";
@If(@IsError(Chosen_Customer);
@SetField(field_name;"");
@SetField(field_name;Chosen_Customer)
)
)

I run this in an agent and the button code is

@Environment("db_name";"adressbs.nsf");
@Environment("view_name";"CompanyName");
@Environment("field_name";"txt_id_distributor_1");
@Environment("title";"Distributor auswählen");
@Environment("message";"Wählen Sie bitte einen Distributor aus.");
@Command([ToolsRunMacro];"(picklist)");
@PostedCommand([ViewRefreshFields])

you only have to change the env. settings for another picklist call.
--

*****************************************
Michael Insberg
ICQ: 11162908
m...@scp.de
http://home.scp.de/~michael
*****************************************


Carsten Suurland <c...@it-optima.dk> schrieb in im Newsbeitrag:
sdgq3.109$P5....@news030.image.dk...

Mike Graham

unread,
Aug 10, 1999, 3:00:00 AM8/10/99
to
Change the @Name([CN]; @DbName) to @Subset(@DbName; 1) in each of the
picklists. @DbName returns a list of 2 items, server name : database path.
The picklists are using these and ignoring the third item, which you are
supplying.

Michael Insberg <m...@scp.de> wrote in message
news:7olvt7$a...@dilbert.scp.de...

0 new messages