Button to return user with date stamp

I’m trying to use a button to update all rows in a column. I want the button to stamp the current date and then show the user clicking the button. I’m guessing this is a problem with displaying the date and user in the same field. The formula does not show an error:

Today() +"- "+ User().Name
but returns this: 44118 Tom Huber
Instead of: 10/14/20 - Tom Huber

Hi there @Tom_Huber :blush: !

Could you try this formula :blush: ?

Concatenate(Today()," - ",User().name)

or this one maybe :

Concatenate(Format("{1}/{2}/{3}",Today().Month(),Today().Day(),Today().Year())," - ",User().name)

Concatenate() tends to works best in general, but I could be wrong.

If any of those formula works, don’t hesitate to share a screenshot of your formula and/or a sample/mock-up doc :blush:

Or even more simpler, taking advantage of the already flexible pattern of Format():

Format("{1:00}/{2:00}/{3} - {4}",
Today().Month(),
Today().Day(),
Today().Year(),
User().Name)

Cheers!

2 Likes

I can only agree here :laughing:!

Thank you very much for pointing out the evidence I missed :yum::innocent:!

This worked, thank you!

I know this is probably possible as well, I just can’t figure out the formula. But is it possible to make a button act as a filter? For example if I have a selected list colum with values of “New”, “Existing” and " Add-On", can I create a button that will filter the table to just show the “New” results. I’ve tried to pull the formula created from the interactive filter, but I can’t seem to figure out how to set it to filter on one specific result:

Template.Status.ListCombine("").Unique().Sort()

Well, depending on your doc and your needs but this might help you :blush: !

Edit : Tiny add-on with a filtering button on the canvas

Thank you. I was hoping to use a button to avoid using the interactive filter. When I click on the button on the example below, I would only want to see the rows that have the test column populated with 1. So it should refresh the table to only show 3 results…aa,bb,ff

Thank you very much for sharing an example :grin: !

Unfortunately, it is not visible to anyone right now. But it’s easy to correct :wink: !

In the sharing window that opens when you share a doc, you just need to change the dropdown menu “Anyone with a link” (at the bottom) which is currently still on “no access” to “can view:wink: .

Just in case I’m not clear, here is a screenshot :blush:
IMG_6239

That should solved this problem and we could go back at trying to help you :grin:

Sorry about that, I shared now.

Hi @Tom_Huber,
can I ask you what is the advantage of using a button to filter data?

What you ask can actually be done (through a utility table).

However, I really struggle to understand the added value, considering that you need to have one button per filter; therefore - in your case - three buttons.

From a “normal” UI (and UX too) perspective a drop-down would be the most expected way to achieve that.
Also considering that it is extensible by design (i.e. adding more values, wouldn’t change your implementation).

I really appreciate your insight and your actual need to better get into the point.

Thank you!

Just to better explain, this is what should be likely expected for a dynamic filter:

No worries, it happens :wink: !

Well, It took me some time to get to a workable solution but I must say that filtering a table with a button is quite less efficient than using interactive filters :slight_smile:.

But, here it is :wink:

I found inspiration in this post to get there.

So, I had to add a checkbox field in your example table and a single select control on the canvas to choose the number you want to filter your table by.
After that just click on the button “Filter”.

Technically, the button doesn’t filter the table, it just checks the appropriate checkboxes. Then the table filters those checkboxes afterwards by using the values in the formula I put on the canvas under “Filtered results” :wink: with this formula :

If([Filtered results]=0,thisRow.Checkbox=false,If([Filtered results]>=1,thisRow.Checkbox=true,""))

I’ve added a button to clear the checkboxes, so you can “un-filter” your table too and it will go back to its orignal state :blush:

Hello, thank you both for your input and providing a few suggestions. I do understand that this is basically achieved with the interactive filter. I was just looking to make the filtering process a little cleaner for specific users. The example I provided was small. But if we expand to say a data set of 20 different filter (returns). Having to click the select all, to clear and unclear the filter is just a bit clunky in my opinion. If I have a user that needs to see all the results, but then typically only filters on 5 different returns. They have to:
click select all to clear,
then select the 5 different filters they want
and then click to the side to refresh… so 7 clicks total just to get the filters results.

If I can clean that to make them a button that automatically filters the 5 returns they always filter by then that just seems like a cleaner and easier for that user

I hope I explained a little better. Again thanks for the examples!

If I understand correctly your need here, then I think, like Frederico suggested it above, using a utility table could help as the “Clear” button I put in my last example (on the canvas) could clear the checkboxes in the table you need to filter and also the Filtering by values in the utility table (as buttons on the canvas work a little bit differently than buttons in a table).

Here’s another example using a utility table :blush: .
It’s still works like my previous one though (not actively filtering the table, just checking the right checkboxes) :wink:.

Edit : You can hide the Checkbox field in the table if it bothers you :wink:.
You can also hide the Filtered Rows field in the utility table too :blush: .

@Tom_Huber,
thanks for the deeper insight.

I see what you mean and I encourage you to pursue your investigation (thanks also to the restless help of @Pch).

I only have the suspect this might be of an over-complex solution to a not fully outlined problem.

Unless you are totally certain that the users will only filter with those specific column values every time (and in that case, you could easily build up a view), you then have to build up new filters and maintain them every time a new user’s request arises.

This sounds a bit familiar to me as I have seen these “uncontrolled routes” so many times.
Sorry if I keep on challenging you. I’d be happy to discuss on a more concrete example if you think this is useful. :slight_smile:

Cheers!

1 Like

I’m just trying :wink: !