API data filter, sort, dir

Quick question, hopefully hasn’t already been asked and answered.

When using a database it is very simple to use sortable headers and textual filtering.
If my server side data is not coming from a conventional database but rather from an API call is there a way to get the same functionality, have tried like I would for a database with the sorting so far and it does not work.

Update, i have tried getting the sorting working with the data view component as well and although it is certainly doing a sort it seems like it is not sorting correctly, so maybe I am doing something wrong.

Soon we will address this with a whole new Data Transformation actions for Server Connect and App Connect.

So you will be able to do a lot of data transformations on a whole table result like adding columns, joining data sources, renaming columns, filtering data and dedupe.

You can do some filtering and starting already with formatters but data transformations will be much more powerful.

6 Likes

Amazing news George, you guys literally think of everything somehow

Sorting, filtering & paging

Client-side - data view component

Server-side - formatters

Most efficient- if you can send sort, filter, page as parameters to fetch from your api endpoints (if you have control over it)!

I used the data view component and passed in the server action that fetches my API data, however the sorting is changing the order of everything in my table around, but not correctly.

As an example i sort a column that has 10 records with a string of wording and another 10 in the same column that are blank, the sort puts 3 with data then a blank and then 1 more with data and 4 blanks etc. So I assume the data view component does not like the API data source too much either.
Probably safest to just wait for the upcoming additions before I add this functionality.

I expect you’ve checked this, but just in case… This sounds like the problem you’ve documented here (tip 1).

mwahahaha, my own tip, lol, thats funny, I am going to try that out quickly, i thought it was only to do with databases but i suppose it could also be the same situation for API data.

This sounds like a really useful feature - with a great list of options. (A couple of others which spring to mind: resizable column widths and sortable rows*…)

*I meant drag/drop sorting - to update a sort field (already possible but only with manual coding)

Well thankfully it does not seem to be that in this particular case, although I confess that this is probably about the third time in my entire DMX and Wappler life i have used the data view component so its very possibly me doing something wrong.

Figured it out, there is something very funky with my data, not Wappler or Data View, difference between my few postman entries vs Wappler entries sticking in some hidden BOM type characters that nobody can even see.

I’ve spent a few puzzled hours due to these - trying to get mailmerge to work in Word on OSX. I had to create a +BOM export version.

1 Like

Been there, I feel your pain, CSV export to pastel accounting application requires a BOM to start or nothing imports, honestly who thought a hidden char was ever a good idea, sounds like some idea I would have come up with.
Patrick very kindly added the ability to add or remove the BOM after I had the issue
Screenshot 2020-05-11 at 20.55.29

1 Like

Thanks for being responsible for this. Admittedly, a sightly obscure feature - and not a very exciting one - but I shall probably be grateful for it at some point. I hadn’t noticed it before (my previous BOM experience was not in Wappler).

1 Like

Just do not say that we will get the functionality similar to the Excel Power Qwery for easy manipulation of the data from different sources? If so, then I can die with happiness …