Jump to content

Posting Deactivate & Expiration


Recommended Posts

I have a postings bulletin board website in which I have placed Caspio datapages.

I received the following code, from a Caspio support specialist, placed in the Footer, which causes the posting contained in the database to expire, "deleted" after a given time, which works great:
<script>
function f_date(){

var v_currentDate=new Date();

v_currentDate.setDate(v_currentDate.getDate() +14);
var v_assignDate = (v_currentDate.getMonth() + 1) + "/" + v_currentDate.getDate() + "/" + (v_currentDate.getFullYear());
document.getElementById('EditRecordExpiration_Date').value = v_assignDate;

}
f_date();
</script>

I now need to create another postings bulletin board for a new website in which I can perform the following functions:

1) Cause the posting to auto-change from an Active status to an Inactive status at a specified date. The posting must able to be Deactivated manually, from the website front-end by the User or Admin, prior to the auto-deactivate. The Posting must also be able to be manually Reactivated by the User or Admin, from the front-end, after the auto-deactivate. I will need the auto-deactivate time period to reset each time the posting is Reactivated.

2) Then, if it is Reactivated, either after being Reactivated manually by the User or Admin, and then subsequently manually Deactivated or Auto-deactivated, I need to set an Auto-Delete date, after the posting has been Deactivated for a set period of time.

Link to comment
Share on other sites

  • 2 years later...
  • 1 year later...
On 7/9/2019 at 2:50 PM, Meekeee said:

Hi @ecomsales

You can use the new feature TASK on this certain scenario. This allows you to modify data based on a predefined time schedule which you can use to your postings. 

To know more about Tasks, check it here:  https://howto.caspio.com/tasks/

Check this video for more information

I hope it helps!

To add on this, I think it would be a great addition to your application if you can add a feature that will send emails to your users as a reminder that their subscription is about to be expired and it needs renewal. I've found this video tutorial on how to implement this using application task, you may check it using this link: 

 

Link to comment
Share on other sites

On 10/4/2016 at 7:58 AM, ecomsales said:

I have a postings bulletin board website in which I have placed Caspio datapages.

I received the following code, from a Caspio support specialist, placed in the Footer, which causes the posting contained in the database to expire, "deleted" after a given time, which works great:
<script>
function f_date(){

var v_currentDate=new Date();

v_currentDate.setDate(v_currentDate.getDate() +14);
var v_assignDate = (v_currentDate.getMonth() + 1) + "/" + v_currentDate.getDate() + "/" + (v_currentDate.getFullYear());
document.getElementById('EditRecordExpiration_Date').value = v_assignDate;

}
f_date();
</script>

I now need to create another postings bulletin board for a new website in which I can perform the following functions:

1) Cause the posting to auto-change from an Active status to an Inactive status at a specified date. The posting must able to be Deactivated manually, from the website front-end by the User or Admin, prior to the auto-deactivate. The Posting must also be able to be manually Reactivated by the User or Admin, from the front-end, after the auto-deactivate. I will need the auto-deactivate time period to reset each time the posting is Reactivated.

2) Then, if it is Reactivated, either after being Reactivated manually by the User or Admin, and then subsequently manually Deactivated or Auto-deactivated, I need to set an Auto-Delete date, after the posting has been Deactivated for a set period of time.

As for manually changing the status from the front end, what I suggest is to do this by creating a single update record form and receive the parameter from there to modify the specific record that you want to be updated. Here's a HowTo article that you may use as a reference: https://howto.caspio.com/datapages/forms/update-forms/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...