Forum Academy Marketplace Showcase Pricing Features

Get decade from input to search for a year

Hi everyone,

Here’s my situation: I have an input (type: integer because we’re searching for a date) that allows my users to search -through an external API- for artworks.
What I want to do is to return all of the artworks that belong to the same decade. I.e.: if my user is entering 1999 in the input, I want to be able to return all of the artworks that belong to the same decade (1990-2000). Does anyone know how to do this ?

Thank you very much in advance for your help dear Bubble community :smiley:

I would do this with a condition on a workflow that is triggered when the inputs value is changed, and probably store the rounded decade in a custom state so that you can modify it in a workflow and use it anywhere in the page.