Move item from one data table to another?

Essentially, I have a page with a data table setup to act as a mini blog of sorts. When the publish date of the post [is before today] in the workflow, I would like to move that post to a different data table. Is this possible? I tried to “add row” and “set column values” with no luck.

Before making an advice, I would suggest you just using something like an If-Then-Else column based on your publish date. Then you can structure things around that If-Then-Else column.

If you still need to move that post to a different table, you can have a Scheduled Workflow to:

  • Loop through your posts table and filter by rows that have a publish date before today.
  • Add a row to the new table with the same info from the posts row that is being looked at.
  • Delete the original row.
1 Like

Agree with @ThinhDinh. This smells. Wanting to move data from one table to another is almost always an indicator of bad design. Can you explain why it’s necessary to do this?

1 Like

Appreciate the quick responses! I have a blog post tab with dates of puclication for each post. On my homepage, I want to show the most recent post only (I have it limited to 1), but I can’t figure out how to show [today’s post] if there is one for yesterday in the same table. I am okay keeping everything in the same table if I can make just the most recent post show.

To add to that, on my data table with the scheduled to post items, I don’t want them showing up on the other data board either. So I thought having two data tables would be a good way to do this.

Several ways you could do that. Here is one option:

  • Create a Query column, target it at the table, sort by Publish Date in descending order, and apply a limit of 1
  • Use the Query column as the source of your collection

To deal with that, just add a filter to the Query column that I suggested: “Publish Date is on or before Today”

Nope :wink:

1 Like

I’m unable to see the Query column as a source when I add a collection. It only shows the data tables.

That sounds like you may have created the column in a table that the current screen cannot access. It must be either in the table the screen is attached to, or in the User Profile row.