I am using @dblookup to look up odbc values from a table. The SQL is correct and I can compare the values using @If, but I cannot use @Prompt to display the value or @Setfield to put the value in a field. What am I doing wrong for it to not display or let me set it to a field? Thanks!
My code:
Description := @dblookup(…sql…);
@Setfield(“Description”;Description);
@Prompt([OK];“Prompt”;Description);
Subject: @Dblookup results won’t @prompt
Does the lookup return more than one value?Try to @Implode the results before prompting them.
You also might want to use a different name for your variable because how is Notes to know the difference between your field and the variable?
try this:
t_Description := @Dblookup…;
Field Description := t_Description;
@Prompt([ok];“Prompt”;@Implode(Description;“;”)) and see how that goes!
Subject: RE: @Dblookup results won’t @prompt
No, the lookup only returns one value. I tried the @Implode… code you left me but that still didn’t work. Any ideas or other @ functions I should try?
Subject: RE: @Dblookup results won’t @prompt
How do you check what you get back from @DbLookup, what makes you sure it’s a singel value only?
Not knowing your source, the return value could be a number (even if not a list) and that would not work in @Prompt and might fail in @SetField, depending on the field’s data type.
Subject: RE: @Dblookup results won’t @prompt
yep good point there, you could try @Implode(@Text(Description))