cancel
Showing results for 
Search instead for 
Did you mean: 

Syclo - Clearing/Unsetting Date fields

Former Member
0 Kudos

Hi All,

I'm having some trouble with clearing a date field. I need to have the option of setting a date field back to blank if the user request so.

I've tried to create a transaction where the date is a string property and set the date as blank. When running the application, clearing the date field results in the error message <Date> field is required and I'm not able to clear the field.

Thanks in advance for any hints on how to clear a date field.

Thanks!

Tags edited by: Michael Appleby

Accepted Solutions (1)

Accepted Solutions (1)

jason_latko
Advisor
Advisor
0 Kudos

Jason,

You cannot really clear a date field on screen by design.  There is a concept of a special value in Agentry that gives you more flexibility.  You could experiment with a special value tied to your date screen field.  This should put a check box next to the date and allow you to turn it on/off allowing you to finish the transaction without setting it.  I don't believe this will unset a value that has been previously saved, so this may not work for you.  I have noticed that date special values seem broken in the latest clients anyway.

You could add your own check box next to the date and enable/disable the date based on whether the check box is checked or not.

You are working with MyObject and have a data field called MyDate.  Create a Date field in the MainObject called DummyDate.  This is the equivalent of a blank date since there is no data in it.  In your transaction, your final date field is called DateFinal and ties to MyDate in the object.  Create another Date property called DateScreen.  Point your screen field to DateScreen.  DateScreen transaction property initial value should be "From another object".  Set it to MyObject -> MyDate field.  DateFinal transaction property initial value is "Rule after data entry".  The rule should check whether your date check box is checked or not.  If checked, use the transaction value from DateScreen since this is the date the user entered on screen.  If not checked, use MainObject ->DummyDate.  Using DummyDate will set the date back to empty.

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Thanks!

Answers (0)