Solved

@picklist problem

Posted on 2006-06-22
10
631 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 300 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 200 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to change default font size and font in Lotus Notes 9 6,752
Lotus Notes 6.5.5 6 213
NT Kernel & System Process CPU Usage Maxin out 8 54
@Mailsend 3 56
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…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now