phljoe Posted December 14, 2005 Share Posted December 14, 2005 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. Link to comment Share on other sites More sharing options...
mr_vodka Posted December 14, 2005 Share Posted December 14, 2005 Try Set Field [ DateField, DateToText( "" ) ] Link to comment Share on other sites More sharing options...
Lee Smith Posted December 14, 2005 Share Posted December 14, 2005 For this, I would just use the Clear Script Step. Clear [ AnyDate ] [ Select entire contents ] Lee Link to comment Share on other sites More sharing options...
LaRetta Posted December 14, 2005 Share Posted December 14, 2005 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. Link to comment Share on other sites More sharing options...
Lee Smith Posted December 14, 2005 Share Posted December 14, 2005 (edited) 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, 2005 by Guest v8 remark Link to comment Share on other sites More sharing options...
phljoe Posted December 15, 2005 Author Share Posted December 15, 2005 : 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. Link to comment Share on other sites More sharing options...
phljoe Posted December 15, 2005 Author Share Posted December 15, 2005 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. Link to comment Share on other sites More sharing options...
Lee Smith Posted December 15, 2005 Share Posted December 15, 2005 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: Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6708 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