locked
Date Reset RRS feed

  • Question

  • I have a date field that has about 400 enteries and  I need to reset to blank dates at the end of the year. Help
    • Edited by Hydrant60 Friday, September 26, 2014 12:41 AM
    Thursday, September 25, 2014 3:29 PM

Answers

All replies

  • Hi,

    You could try clear the date field in the screen using javascript code,for example:

    Screen.collection.Datefield = null;

    For more details about writing JavaScript That Implements The Binding Pattern In Visual Studio LightSwitch,please see link below:

    http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/168/Writing-JavaScript-That-Implements-The-Binding-Pattern-In-Visual-Studio-LightSwitch.aspx

    Besides, you could delete the date field and readd a date feild manually,it will clear all the dates and reset the field.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.





    • Edited by Jonny_D Friday, September 26, 2014 7:49 AM
    • Marked as answer by Angie Xu Wednesday, October 8, 2014 2:20 AM
    Friday, September 26, 2014 7:49 AM
  • Deleting the date field and readding it works but I don't want to give the users that kind of access and I would rather not have to do that on a yearly bases. If possible it would be easier to be able to reset the date field from within the program. As for Javascript I have no knoladge of how that works. I tried a number of examples as per the help file but none of them worked.
    Friday, September 26, 2014 10:39 AM
  •  As for Javascript I have no knoladge of how that works. I tried a number of examples as per the help file but none of them worked.

    writing javascript in lightswitch ,you could refer

    http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/168/Writing-JavaScript-That-Implements-The-Binding-Pattern-In-Visual-Studio-LightSwitch.aspx

    From the client ,you cannot delete the date field .

    • Marked as answer by Angie Xu Wednesday, October 8, 2014 2:20 AM
    Sunday, September 28, 2014 1:54 AM