Solved

@picklist problem

Posted on 2006-06-22
10
636 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: 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

Independent Software Vendors: 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!

Question has a verified solution.

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

Suggested Solutions

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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