?
Solved

@picklist problem

Posted on 2006-06-22
10
Medium Priority
?
648 Views
Last Modified: 2013-12-18
Hi there,

Any idea why my picklist is always populating the previous value in my form computed field.

For example, if i have the following list of dates:

10/06/2006, 10/07/2006, 10/08/2007, 10/09/2007....

This are populated in the tests view which is called from picklist

Now when I select the first entry 10/06/2006, it seems to be OK and I complete and close the document as required.

However, when I select 10/08/2007 or any other entry next,I get the 10/06/2006 populated still in my field. Then when I select a third entry, 10/07/2006, I then get 10/08/2007 in my field, so it is always populating the previous entry in the field.
It seem like it is caching the entry somewhere but i am not sure where.

Here's my code:

Choice := @PickList([Custom]; "" : ""; "tests"; "Open view"; "Select a test from the list"; 3);
@Command([Compose];"3. test");
@setfield("testdate";Choice)

This is suppose to prompt for a list of tests, then when the user selects - OK , it open a new test document in edit mode and set the value of the testdate to the selected value.

I've tried the testdate field with both computed and computed when composed but still have the same problem.

Any ideas will be much appreciated.

Varvoura
0
Comment
Question by:varvoura
  • 5
  • 3
  • 2
10 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 1200 total points
ID: 16958295
A suggestion: don't put the @Picklist in the button, but in the form.

Button:
    @Command([Compose];"3. test")

Form 3. test:
    field testdate, computed when composed:
        @PickList([Custom]; "" : ""; "tests"; "Open view"; "Select a test from the list"; 3)
0
 
LVL 43

Assisted Solution

by:Steve Knight
Steve Knight earned 800 total points
ID: 16958300
Is Choice being set right from the picklist?  Try a @Prompt([OK];"Choice";@Text(Choice)); before the compose for starters

Have you tried using FIELD TestDate:=Choice; instead of using @SetField too?


0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 16958309
That does sound more sensible sjef :-)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:varvoura
ID: 16958378
Sjef, I have use this action from a button in the view where the main product form is selected as the test a response to the product form and unless the product form is selected, I can't compose the test response for it, UNLESS of course you have another suggestion.

Steve, choice is set correctly but I have tried FIELD testdate...
I didn't think that FIELD is necessary in version 6.5
I may give that one a try now.

Thanks guys, I'll let you know shortly how I go.

0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 16958391
I think sjef was getting at create an action button on the view which checks the correct document is already selected if you need to then just does a compose and let the computed when composed field as sjef suggested prompt with the picklist.

You can use either @SetField or FIELD.... and of course you can set using FIELD in the middle of a formula now too of course...
0
 

Author Comment

by:varvoura
ID: 16958392
sjef, thought about what you said, feel like a total idiot with my last comment.
Real pain of an application i am working on, i can't wait until it is over.

I'll give both of your suggestions a try and we'll let you know.

Thanks
0
 

Author Comment

by:varvoura
ID: 16958438
Steve,

Choice is given the exact value that I am selecting from picklist
FIELD testdate:= choice (the same problem)

I have a feeling that it has something to do with my field type.

Please guys correct me if I am wrong:

1. I can have the field as editable field because it only validate once the document is opened and in this case setting the field won't happen because the document is already open.

i set the field as computed and computed when composed and to compute to its own value, maybe this is where the problem is.

Now,I am about to try sjef suggestion
0
 

Author Comment

by:varvoura
ID: 16958514
sjef, it works magic, THANK YOU!

Can I ask another question in relation to the same issue and I'll increase the points instead of moving to another question.

Can I create a response document from within a response document using an action button?

For example, a product form, from an action within the product form.
The main reason is to keep the first product form linked to the next one(this only happens on expired products) and not every product form.

Thank you both for your help.

Vavoura
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16958863
New questions are new questions...

But yes, you can. The new document must be created using a response-to-response form, and the current document must be saved on disk before you click the button.
0
 

Author Comment

by:varvoura
ID: 16958938
sjef,

I''ll open another question for this anyway, because I hve to clarify one more thing

Thanks
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

850 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