Hi experts,
I need support for writing a code for getting status in Enum Filed of the table via validation of Start Date and End Date.
I have created 3 fields in Table which are as follow:
a. Subscription Start Date (Date Field)
b. Subscription End Date (Date Field)
c. Subscription Status (Enum Field)
also created base Enum with 2 option Active and Deactive
I would like to apply logic if current date is >= start date and <= end date then status field show Active or current date > end date then status shown as Deactive.
Please help me to write this code on table as well as form too.
thanks in advance
Hi Dhaval,
In the modified field of the table write the below code :
if(this.startDate && this.endDate) { if((this.startDate<=SystemDateGet()) && (this.endDate>=SystemDateGet())) { this.Subscriptionstatus = status::Active; } if(this.endDate