Link to home
Start Free TrialLog in
Avatar of varvoura
varvoura

asked on

@picklist problem

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
ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That does sound more sensible sjef :-)
Avatar of varvoura
varvoura

ASKER

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.

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...
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
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
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
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.
sjef,

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

Thanks