Sinky Posted March 31, 2021 Posted March 31, 2021 (edited) Hi FM people! I have one problem which is probably simple to solve but so far solution eluded me. I have a dropdown text field which offers a list of years (Table::Years). This is global field. I have very simple find script: Enter Find Mode [Pause: Off] Set Field [Table::Order Date; Table::Years] Constrain Found Set [ ] Table::Order Date is a date field. Idea is to perform find according to the value chosen from a dropdown list. However, this does not work. I'm getting "provided find criteria not valid". But, if I enter manually one of the years from the list, It works. Same is valid if I write down a year in the script e.g. Set Field [Table::Order Date; 1980]. Set Field [Table::Order Date; Table::Years] itself works when in browse mode, but in find mode, nope This is I guess a format issue, so I tried several combinations changing fields to text or date but without success. Any help is appreciated Edited March 31, 2021 by Sinky
comment Posted March 31, 2021 Posted March 31, 2021 (edited) Is Table::Years a global field? If not, then it has no value once you have entered Find mode and your Set Field step does nothing. I am also puzzled why it is named Years. Can it contain more than one year? If so, you cannot use it for find just as it is. Edited March 31, 2021 by comment
Sinky Posted March 31, 2021 Author Posted March 31, 2021 (edited) Yes...it's global field. It's called "years" because it's a dropdown list that contains a list of years. Edited March 31, 2021 by Sinky
comment Posted March 31, 2021 Posted March 31, 2021 16 minutes ago, Sinky said: Yes...it's global field Then I don't know how to reproduce your problem. 16 minutes ago, Sinky said: It's called years because it's a dropdown list that contains a list of years. A field does not contain a dropdown list. It contains the value (or the values) you have selected from the drop-down list attached to the field.
Sinky Posted March 31, 2021 Author Posted March 31, 2021 You're right....so, the field contains one value which is chosen via drop-down list attached to the list Tnx for trying!
Sinky Posted April 1, 2021 Author Posted April 1, 2021 For what is worth, I think I found the source of the problem. Table::Years field was not included in the Table view layout.
comment Posted April 1, 2021 Posted April 1, 2021 1 minute ago, Sinky said: I think I found the source of the problem. Table::Years field was not included in the Table view layout. If it was not on the layout, then how did you make the selection? In any case, that cannot be the cause of the problem you described. The Set Field [] script step works entirely at the data level and does not depend on the presence of any field on any layout.
Sinky Posted April 1, 2021 Author Posted April 1, 2021 The filed was on the Form layout. Well, you're right.... I can't recreate the problem but I don't understand how I managed to solve it. 😑
Recommended Posts
This topic is 1585 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now