December 14, 200520 yr Hello, In Scriptmaker, I'd like to insert a line in a script to remove a date from a date field. I would think I should use the "Set Field" script step, specify the date field I want to clear, and then enter "". However the calculation result must be a date so the field displays a "?" How can I rewrite this to simply get the date field to be empty? Thanks.
December 14, 200520 yr For this, I would just use the Clear Script Step. Clear [ AnyDate ] [ Select entire contents ] Lee
December 14, 200520 yr Keep in mind that the field must be present on a layout in which the Clear[] script-step is activated (at least in vs. 7). Otherwise it won't clear the field. I don't believe this is documented in FM Help either ... A straight Set Field [ dateField ; "" ] works in vs 7/8 now. It's a wonderful improvement over prior versions.
December 14, 200520 yr Good point. I don't think this has changed either. Lee Long overdue, and thanks for point this out to me. I feel like a sponge with v8. Best version yet. Edited December 14, 200520 yr by Guest v8 remark
December 15, 200520 yr Author : Hi Mr. Vodka! Thank you. This worked. I wouldn't have thought of that since "Date to text" seems to contradict the calculation qualifier that result must be a date. I greatly appreciate your response.
December 15, 200520 yr Author Lee, By "AnyDate" I assume you mean the date field I am trying to clear. If so, that didn't work. Thanks for the response, though.
December 15, 200520 yr AnyDate is my sample date field name. You would just substitute the name of your own Date Field for it. The only reason that this [color:red]Would Not work, is if the field is not on the layout that you're on when using the script. (see LaRetta post ) Lee :cool:
Create an account or sign in to comment