Ideas

Add parameter to Lava filter "Split" to control whether or not empty entries should be removed

Add parameter to Lava filter "Split" to control whether or not empty entries should be removed

Lava

I'm working with some data in a CSV file where each column is in a fixed position, but each row's population of the data is variable. Meaning, I could have data like this:


Survey Id First Name Last Name Email Trait Pattern Survey URL
1 Ted Decker ted@fakeinbox.org https://google.com
2 Alisha Admin alisha@fakeinbox.org Socializer https://google.com

I need to be able to rely on the Survey URL always being at index 5, but the built-in Lava filter "Split" by default removes empty entries. So in one row, the URL may be at index 4, and the next it could be at index 5. In the Rock/DotLiquid/StandardFilters.cs file, the Split filter has ".RemoveEmptyEntries" on the returned result.

Screen_Shot_2021-09-09_at_1.11.24_PM.png

I would love it if there was a parameter added to the Lava filter where by default it would remove empty entries, but we could have the flexibility to pass a parameter (i.e. RemoveEmpty:'false') into the filter to leave in the empties.

Photo of Leah JenningsSubmitted by Leah Jennings, Northside Christian Church  ·   ·  Lava
Login to add a comment...