# Does big table allow you to filter data based on if-else-condition value? (For Show API)

**URL:** <https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178>\
**Category:** Ask for Help\
**Created:** [September 6, 2024, 8:00am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178 "2024-09-06T08:00:24Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [September 6, 2024, 8:00am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/1 "2024-09-06T08:00:24Z")

</div>

Hi Guys,

I have a big table, where there is a if-else-if column which is true for certain condition and false for others.

I am using big table so that API will give me list of Names for which this if-else-if condition is true.

But I dont see Show API listing this if-else-if parameter.

Is there something I am doing wrong? Or what is a workaround?

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 6, 2024, 9:12am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/2 "2024-09-06T09:12:27Z")

</div>

Computed columns are not available via the API, for any data source.

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [September 6, 2024, 9:33am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/3 "2024-09-06T09:33:32Z")

</div>

Oh ok @Darren_Murphy

I have a requirement where I check data difference and if data difference is greater than 7 days I want data to be fetched for that particular row item

So I need to only send this item in my get api

Is there any way I can do this?

using if-else-f is out of question

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 6, 2024, 9:38am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/4 "2024-09-06T09:38:27Z")

</div>

> [@Dilip\_Adiga](#):
>
> I have a requirement where I check data difference and if data difference is greater than 7 days I want data to be fetched for that particular row item

Assuming that you have the date in a non-computed column, couldn’t you just calculate the date 7 days ago, and then use that date as a filter in the API query?

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [September 6, 2024, 9:46am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/5 "2024-09-06T09:46:13Z")

</div>

Hi @Darren_Murphy ,

Thank you for replying.

I am not following your point.

I have column called LastUpdatedDate which is date and time column. Every time new data is fetched the LastUpdatedDate column is updated with latest date

> [@Darren\_Murphy](#):
>
> couldn’t you just calculate the date 7 days ago,

how do I do this?

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 6, 2024, 9:53am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/6 "2024-09-06T09:53:18Z")

</div>

Where are you sending the API call from?

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [September 6, 2024, 9:55am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/7 "2024-09-06T09:55:53Z")

</div>

Hi @Darren_Murphy ,

I am using glide API to send the list of creators and their profile link.

The external source checks the profile links and sends back values to my glide table.

When it does they also update LastUpdatedDate column with latest date.

That’s how I am fetching lastupdateddate currently.

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 6, 2024, 10:01am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/8 "2024-09-06T10:01:47Z")

</div>

I thought you were querying the Glide API?

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [September 6, 2024, 10:12am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/9 "2024-09-06T10:12:36Z")

</div>

It’s using glide API itself.

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [September 6, 2024, 10:21am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/10 "2024-09-06T10:21:51Z")

</div>

I am using glide api itself to send the list of creators

Using glide big table

They they use glide edit api to send me data back.

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 6, 2024, 10:34am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/11 "2024-09-06T10:34:14Z")

</div>

Okay, the below confused me…

> [@Dilip\_Adiga](#):
>
> I have a requirement where I check data difference and if data difference is greater than 7 days I want data to be fetched for that particular row item

Anyway, assuming I’m now understanding correctly, what you could do is take an extra Joined List of the Date column, and then use that in the JavaScript, excluding those rows that don’t meet the criteria.

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [September 6, 2024, 10:46am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/12 "2024-09-06T10:46:48Z")

</div>

Hi @Darren_Murphy ,

Can I then pass it in my get api request to get only that list ?

In my api response

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 6, 2024, 11:00am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/13 "2024-09-06T11:00:50Z")

</div>

> [@Dilip\_Adiga](#):
>
> Can I then pass it in my get api request to get only that list ?
> 
> In my api response

I have absolutely no idea what you mean by this, sorry.

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [September 7, 2024, 10:48am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/14 "2024-09-07T10:48:04Z")

</div>

Hi @Darren_Murphy ,

Good day!

Sorry what I meant is

I have a list of creators in my Big table. I will Need to send a filtered list of creators using the Glide API.

> [@Darren\_Murphy](#):
>
> Joined List of the Date column, and then use that in the JavaScript, excluding those rows that don’t meet the criteria.

ok So you are saying I create a joined list of Date.

Then write a java script that picks dates which are more than 7 days and →

I am using the below JS and get the output where it says fetch for number of dates which are more than 7 days. But same results are printed in every column

Like if I have 3 dates more than 7 days

**It says Fetch,Fetch,Fetch**

**Even if I get a row to output Fetch by comparing dates, how can I pass the filtering criteria in my Glide api request? Dont think Javascript column output comes in postman Get api request of glide api**

```auto
// Check if p1 is defined and not empty
if (typeof p1 !== 'undefined' && p1 !== null && p1.trim() !== "") {
  // Assuming p1 is a joined list of dates in 'DD MMMM YYYY at HH:mm' format, separated by commas
  var dateList = p1.split(","); // Split the joined list into an array of dates
  var currentDate = new Date(); // Get the current date

  // Initialize an array to store the results
  var result = [];

  // Loop through each date in the list
  for (var i = 0; i < dateList.length; i++) {
    // Remove "at" and trim extra spaces, then convert to a date
    var inputDateStr = dateList[i].replace("at", "").trim();
    var inputDate = new Date(inputDateStr); // Convert the string to a date object
    
    // Calculate the difference in time (milliseconds)
    var timeDifference = currentDate - inputDate;
    // Convert time difference to days
    var dayDifference = timeDifference / (1000 * 3600 * 24);

    // Check if the day difference is more than 7 days
    if (dayDifference > 7) {
      result.push("Fetch"); // If more than 7 days, push "Fetch"
    } else {
      result.push(""); // If not, push an empty string
    }
  }

  // Join the results back into a string separated by commas and return
  return result.join(",");
} else {
  return ""; // Return an empty string if p1 is undefined or empty
}

```

**I am getting in the column Fetch for each rows which have date different more than 7. But all rows have same value. How can I make sure that Get api of glide only sends those which have more than 7 days.**

Confused with the last part

Thank you in advance,

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [September 7, 2024, 11:30am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/15 "2024-09-07T11:30:22Z")

</div>

Hi @Darren_Murphy ,

From my understanding even after I get out put of JS

any manipulation I have to do to get data will be on a computed column which does something to get me required data or JS column

Which is not printed in the response of Glide API. as Glide API does not support JS or computed columns in the response

Are you saying I make use of Zapier or make to write this output into text column ??

Sorry if I sounded stupid , Thank you in advance

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [September 8, 2024, 4:11am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/16 "2024-09-08T04:11:18Z")

</div>

Hi Guys,

Any help/suggestion on this?

Thank you in advance for help.

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [September 11, 2024, 8:27am UTC](https://community.glideapps.com/t/does-big-table-allow-you-to-filter-data-based-on-if-else-condition-value-for-show-api/76178/17 "2024-09-11T08:27:23Z")

</div>

Hi @Darren_Murphy ,

I am not quite sure that I can still get the filtered response here because JS column is a computed column right?

Thank you.

Regards,  
Dilip
