Button badge if pressed

Hi community!

I’m trying to implement some way to know if a button has been pressed? I have a document that adds a row to a document with data whenever a button is pressed, however, I have to scroll to the bottom of the document to see what the last row added was to know if a button has been pressed. Is there a way to add a badge or something if it’s been pressed? I have another button that has the option to show a results column when it’s been pressed (email button), but this add row button doesn’t have that option?

Thank you!

Hi @Nikki_Donkin

You can create yourself a tracker to easily check that !

If the button is in a table

Just create a “Tracker” Column, and add to your button the function RunActions(action 1, action 2, etc...)
Set the actions you need in the RunActions, and at the end, put a final action ModifyRows to modify your tracker column.

See the example below, in my case I want to modify status to “done”, and to track the push I put the date/time whenI last pushed the button (I separated the two modifyrows function on purpose for the example, assuming that you may have anything as first action)

if the button is outside a table

This is exactly the same, but create a control in your page (texte for example, toggle or watever, and us SetControlValue)

CPT2210230158-391x163

image

Hope this helps!

Quentin

2 Likes

And the badge is indeed a good idea. You can easily adapt this. Considering my second example, we can check how many times your did push your button. Use your tracker to increment this number

And set the badge to the value of your tracker, tracker you may put in some hidden pages :wink:

This is not necessarily the best way to know that the button has been pushed, but I think you see the point now, and how to customize it to fit your needs !

2 Likes

Hey Quentin, thanks so much for a reply! I tried to implent the first option into my current button formula, but it didn’t work, perhaps my formula isn’t written in a way that can incorporate it?

Sequence(1, thisRow.[Order Number].split(",").Count())
  .FormulaMap(
    Addrow(
      [Orders Separated],
      [Orders Separated].[Line Item],thisRow.[Line Items Split].Nth(CurrentValue),
      [Orders Separated].Order,thisRow.[Order Number Split].Nth(CurrentValue),
            [Orders Separated].SKU,thisRow.[SKU Split].Nth(CurrentValue),
      [Orders Separated].Quantity,thisRow.[Volume Split].Nth(CurrentValue), [Orders Separated].[Order Tags] ,thisRow.Tags,[Orders Separated].Fulfillment ,thisRow.[Fulfillment Status]
    )
    )

Hi @Nikki_Donkin,

to check that, would you at least score some screenshots, for better undestanding ?

Thanks Quentin! see below screenshots - its a document for my shopify store :slight_smile:

The button separates it out into a table with individual line items instead of in one row etc

Hi @Nikki_Donkin
I understand what you’re trying to do, but may be you have some hidden columns, cause I dont find all the reference of your formula in your table.

Are you sure all your “X Split” columns *do really contains split data ?
If yes, the formula should work

CPT2210232205-664x484

but I would need to see your doc to make sure every column is ok. Do not hesitate to make a dm to share the doc if private.

Also, is that OK with the button tracker ? This was your first request, but I dont see it in the formula you paste :wink:

Hey Quentin, I’ll send you a DM with the link. I tried adding in the button tracker to my code but it wouldn’t work, so I must have been doing something wrong haha

Hi @Nikki_Donkin , I set the button tracker in your doc directly. Can yon confirm this is OK
Thanks,
Quentin