Show the latest entry only

Hi. I am building an app where users add ratings to risks. When displaying the list of risks I only want the latest rating to appear. Currently, all ratings are visible:


Iā€™m trying to figure out a filter or data lookup that will only show the latest rating per risk. Can someone please help :slight_smile:

1 Like

Hi @isaac,

When you do a lookup action in a flow part, you can select whether it should get you a single or multiple records from a data item.

Choose single. Triggre will then ask you how to sort them, in case there are multiple. Here you can choose date from your data item, and sort largest to smallest. This will get you a single item, that is always the latest.

Hope this helps!

Hi
If I give it a list of ratings will it narrow it down to a smaller list with the latest rating per risk or it will only give me one rating? When I tried the method, the output was a single data item rather than a subset of the larger list:


Input is a list but

Out is a single item rather than a smaller list with the latest per unique item.

1 Like

In that case I would just make a reference to the latest rating. Simply update it every time the user adds a new rating. I think that should work.

Aaaah, yes. I have a sequence number therefore I can update it on the unique risk. Thank you!

1 Like

It worked! Yesssss. Thanks

2 Likes

Hi Isaac,

How did you build the graphics with the numbers in it?

Regards,

Ed

1 Like

Hi @Ed1,

I assume he used images. Alternatively, you can also use emojis, in for example a pick list.

An easy way to find and copy emojis is emojicopy.com.

This is also great for statuses. A good example is in My Triggre, where we use green and red circles to indicate the status of an application, subscription and DNS records for example.

Hope this helps!

Correct. I had to create images for each possible scenario. It would be great if there was some form of conditional formatting available based on the properties of the data items. Any chance of this in the near future @Jesse? @Ed1

1 Like

Hi @isaac,

We have some conditional formatting on our roadmap, though not on the short term. There are many pre-requisite requirements that have to be met first regarding the user interface before we can do this type of formatting.

For now images or emojis will have to do. Pro-tip: the advantage of emojis is that you can also use them in menu items and buttons :slight_smile:

Thx, Thought so, because I did that also.

1 Like

Hi Isaac,

The performance with these images is quit bad. How is yours? I have made PNG images.

regards,

Ed

The images have a delay loading. It reduced when I reduced their size.

I want to try @Jesse idea of emojis because I believe those will load faster plus I can now use menus, buttons and pick lists

Hi Isaac, How many bytes are your images. Mine are about 3Kb a piece and some with text 21Kb.

Regards,

Ed

Hi @Ed1 they are 1KB. The emoji option is working perfectly now that I have used it as a replacement. Thanks @Jesse

2 Likes

Hi Isaac, where can i find these emojis

An easy way to find and copy emojis is emojicopy.com.

And more important: can you adjust these with text or numbers?

You can use them in pick lists or concatenate them (paste together) with other texts. They are just text basically.

Here is an example of how you could represent a percentage as 10 emojis (in this case, 30%):

:green_square: :green_square: :green_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square:

For some inspiration; you could make a flow part that creates this, given an input number between 0 and 100.

This is brilliant. I was wondering how to accomplish this for my progress tracking app

2 Likes