?
Solved

Error: Keywords must be text!  On @Picklist

Posted on 2006-07-06
7
Medium Priority
?
733 Views
Last Modified: 2013-12-18
Hi Experts,

I have the following formula which I want to put as a formula, in a Dialog List..  I am just wanting to retrieve a column from an existing view.

//////////
values := @PickList( [Custom] : [Single] ; Server : DBTables ; "(LUAgent)" ; "Agents" ; "Select an Agent" ;2);
FIELD LeAgent_1 := @Word(values;"";1);
@True
//////////

When I click on the dialog list I see my view with the data I want to populate my field with, however, when I select the option and hit OK I get the error  " Error: Keywords must be text! "

WHY?? Look like text to me ;)

Thankyou
Broad.
0
Comment
Question by:BroadAustralia
7 Comments
 
LVL 19

Expert Comment

by:madheeswar
ID: 17049092
looks like this line has probem:
FIELD LeAgent_1 := @Word(values;"";1);


try:
values := @PickList( [Custom] : [Single] ; Server : DBTables ; "(LUAgent)" ; "Agents" ; "Select an Agent" ;2);
FIELD LeAgent_1 := values;
""

let us know what it gives.
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17049553
Are you trying to get the first characters upto a space with the @Word?  Second parameter is the seperator and not sure what it would do with a null seperator, should it be " "?

I presume column 2 in the view *is* text?

But as madheesware says see what ends up in your field and it's data type leaving out the @Word.

0
 
LVL 1

Author Comment

by:BroadAustralia
ID: 17054970
Thanks for the help.

The following code ( from Madheeswar )
values := @PickList( [Custom] : [Single] ; Server : DBTables ; "(LUAgent)" ; "Agents" ; "Select an Agent" ;2);
FIELD LeAgent_1 := values;
""
returns a blank picklist.

I don't know why I was using @Word. I grabbed it from an existing app and guess I wasn't thinking it thru.

Yes the view I am retrieving data from is text.  The view is 2 columns..  First column is field emCode ( sorted ), second column emCode ( hidden )..  I know it is only the one field but I am trying to keep the same format for all my lookup views.  ie col1 displays what user sees, col2 contains actual data ( which in this case is the same ).

I don't understand why if I have this code behind a button it works, but behind a Dialog List it doesn't?

values := @PickList( [Custom] : [Single] ; Server : DBTables ; "(LUAgent)" ; "Agent" ; "Select Agent" ;2);
FIELD LeAgent_1 := values;"";1;
@True

Thanks guys
Broad.



0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 18

Accepted Solution

by:
marilyng earned 2000 total points
ID: 17208706
Interesting exercise.  A picklist does work in a dialog list formula, with very strange results.  

When you first open the form in edit mode and click on the dialog list arrow, you get the pick list, and are able to select a value from the list which is then entered as the value in the dialog list field.

If you save and close that form, and then double click on it in the view to open it, the pick list launches before you open the form, as if to run the form open formula and set the dialog list option values.  It has no affect on the underlying field, and if you put the form in edit mode and click on the dialog list arrow to select a new value, you will only see the one value you had already selected.

A pick list is meant to display a view so that the user can make a context selection.  A dialog list can also be made to flash a view, and you would do this is the properties where you have "use address book for choices, or use formula for choices.. scroll down and use "view" for choices.

It works behind a button, because it's collecting your choices that you will eventually push to a field or variable.  It doesn't work behind a dialog box because Notes is confused.



0
 
LVL 1

Author Comment

by:BroadAustralia
ID: 17314693
Ahh it makes more sense now -- thanks Marliyn...    So use @Dblookup if I want to do it this way.

Thanks all,

Broad.
0
 
LVL 18

Expert Comment

by:marilyng
ID: 17314795
Yeah.. or a button with picklist in it. :)
0
 
LVL 1

Author Comment

by:BroadAustralia
ID: 17314832
I think sometimes the button clutters up the screen and makes the UI inconsistent ie. some buttons, some dialog fields. thats why I was looking at this solution..  ta!!

Broad.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question