Steve Stava

No-code enthusiast! -->
I am trying many of the no-code front-end development tools but only use one backend no-code tool...Xano!

Have Group By/Aggregate/Sort for an Array like Queries have

I would like to be able to apply the same group by/aggregate/sort that query output has, but to an array variable.

The scenario I have run across is as follows:

1) Run a query to get a list of Trello cards that I have imported to the Xano database

2) Currently, I post-process the query results array in a Xano function. The reason for this is that there are a few Trello cards that need to be individually removed (test cards and such) but I don't want to remove them in the query otherwise I would have to do that same removal across many queries. So, I have centralized the removal of the cards in a function that I can reuse after any relevant query

3) My dilemma shows up when I realized that I wanted my API to return two main groups of information.

-- A group of info with an aggregated list of cards with a count for the number of each card grouped by the columns they are associated with, in Trello...[{"list": "In Process", "count": 3}, {"list": "done", "count": 8}]

-- A group of info with the full list of post-processed cards from the query (after running them through the post-processing function)...
[{"title": "do a thing", "list": "In Process", "card_url": ""}, {}, {},... {}]

Β The issue is related to how I get the grouped/aggregated/sorted result from a query, that can do aggregation easily, but doesn't have the post-processing function applied.

The result is that the aggregated data has more cards than the post-processed data since I have to do the aggregation in the query and can't apply the post-processing function to the results after they have been aggregated.

My thought was that it could be helpful to be able to do one query to get the list of all cards, run the list through the post-processing to remove cards, and then run the "cleaned" array through a Utility Array function that allowed me to do the same group by/aggregate/sort that a query does but only to an Array variable.

This all came about because I wanted to have a screen that has a chart of the card count by Trello List/column and also have a table of all the cards. I liked the idea of getting this data in one API call (2 groups of data) so I know the grouped data will always match the count of detailed table data.

How to format an Eval/Grouped By timestamp?

I have a timestamp value that I use in both Joined tables through the Eval capability as well as in the Grouped By of Aggregated output.Β 

I would like to be able to Format the timestamp into a human readable format, but I am not finding the format timestamp filter.

How can this be accomplished without creating a new column in the database (for a formatted timestamp) or by looping through the list of items to create a formatted version of the timestamp?


Xano & AppGyver - Building a Favorite Feature for Products

I have a quick two-part series on building a favorites feature for products. I show you how to build the database tables, data relationships, APIs (get a list, add favorite, delete favorite). I also show you how to manage the data integrity from the APIs so the user interface can't accidentally mess up your data πŸ˜„

With the database, business logic, and APIs built, I will show you how to tie the Xano backend into the AppGyver front-end tool. I walk you through defining the API data resources for the Get, Add and Delete of the favorites as well as how to build a production worthy(?) user interface for a list of products.

Let me know what you think!

ο»Ώ ο»Ώ
ο»Ώ ο»Ώ
Like Comment

Getting a Trello Card created-at timestamp

It seems like Trello has a bit of a cryptic way to store a Card timestamp. The created-at timestamp for a Trello Card is the first 8 hex characters of the Card id/guid.

Those 8 hex characters need to be converted to their equivalent decimal value. The decimal value is the Epoch timestamp, which can be converted to a localized timestamp.

My issue is converting the 8 characters from hex to decimal. Any thoughts on how to do that in Xano?

I am excited to be here!

I have been enjoying learning, building, and teaching in the no-code space. If you are bored and are looking to learn how to no-code, check out ...At some point, I will get back to building my app that started me down this path πŸ˜„
Like Comment