108
Views
8
Comments
Solved
how to set expiry date ?
Application Type
Traditional Web, Mobile

Hello everyone,

I'm a newbie and currently trying to develop reward point application, but I get stuck and hope u guys can help me to find out :)

I want to set expiry date for redeem the gift, so when it goes expired the gift can't be redeem. How can I do that?


Screenshot_18.png
2025-02-04 10-17-42
Shreelakshmi N S
Champion
Solution

Hi,

It is possible to set/edit the expiry date. First create an attribute in your entity to store the expiry date. Then while redeeming the gift check the expiry date is less than the currdate.

Eg: SampleEntity.ExpiryDate < CurrDate()

Let me know if this works!!

Regards,

Shree

RedeemGift.oml
2025-04-17 05-42-16
Ajit Kurane

Nice example. 

UserImage.jpg
Radjawali Company

Hi, it's work! Thanks for helping me to solve this problem. I'm really appreciate that :) 

Regards,

RC

2025-04-17 05-42-16
Ajit Kurane

Hi,

Please explain more that after how many days you want to expire it after creation.

Using Adddays function we can achieve this based on your requirement.

E.g  Expires_On= AddDays( Created date, 15 )

So that after 15 days it will be expire.

Thanks,

Ajit Kurane.

UserImage.jpg
Radjawali Company

Hi, 

for the expire date I can set/edit using date picker. is it possible to do that using Adddays function?

2025-04-17 05-42-16
Ajit Kurane

Can you please share your sample oml file ?

2025-04-17 05-42-16
Ajit Kurane

I have no idea about your expiry date criteria. But in addition you can do one thing if you want to manually update expiry date then you can create one pop up and on click of date pop up will prompt on screen and then  you can update the expiry date to redeem the gift. 

Hope it helps.

Thanks.

UserImage.jpg
Radjawali Company

Hi, thanks for your help and your time. I'm really appreciate that :)

Regards,

RC

2025-02-04 10-17-42
Shreelakshmi N S
Champion
Solution

Hi,

It is possible to set/edit the expiry date. First create an attribute in your entity to store the expiry date. Then while redeeming the gift check the expiry date is less than the currdate.

Eg: SampleEntity.ExpiryDate < CurrDate()

Let me know if this works!!

Regards,

Shree

RedeemGift.oml
2025-04-17 05-42-16
Ajit Kurane

Nice example. 

UserImage.jpg
Radjawali Company

Hi, it's work! Thanks for helping me to solve this problem. I'm really appreciate that :) 

Regards,

RC

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.