• Resolved jenked

    (@jenked)


    Hi Tobias,

    I am trying to hide rows when a column is either empty or has N/A in it. The first column has set values in it, and the second has ACF values.

    Right now I have
    [table id=1 filter="N/A||n/a||N/A" filter_inverse=true cache_table_output=false /]

    As my shortcode. This filters out anything with N/A in it and works great. Is there a way I can make it so it hides rows when the second column is empty (in addition to hiding rows with N/A)?

    Pardon my ignorance, I assume this is an easy fix I just can’t seem to find how to signify empty in the string. I’ve done quite a bit of searching around.

    Thanks,
    Jake

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I’m afraid that this is not trivial at all ?? In fact, I can’t think of a solution here right now. The problem is that empty cell values are rather special here (as an empty filter word essentially means that filtering is turned off)…

    How are you embedding the ACF values into the cells? Also via a Shortcode?

    Regards,
    Tobias

    Thread Starter jenked

    (@jenked)

    Oh not trivial huh? I can never tell how easy it is with coding haha.

    I’m importing products essentially through an importer plugin that reads CSV files (technically TSV – tab delimited), which places the values onto ACF fields for the products. Then Tablepress pulls up shortcodes from ACF to get the values.

    That’s okay though, I thought this would be an easy solution. Maybe I can force the original data set from the TSV’s to automatically put N/A on the empty cells – easily done manually, perhaps harder automatically we’ll see.

    Thanks for getting back to me!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    that idea with changing the empty values that ACF returns to “N/A” is my recommendation here as well. Essentially, you could define a wrapper Shortcode around the ACF Shortcode and replace empty return values with e.g. “N/A”.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Row Filtering when column is empty’ is closed to new replies.