How to set different button functions?

My app mainly displays the collected deal information. The premise is that I am currently using the free version of Glide. I use the AI ​​function, but I found that the content designed by AI takes a long time to load, so I gave up AI.

I want to set two buttons.

The first question:
One button is to display the code, and then click it to copy the code with one click. I want to know how to set.

The second question:
The other button is to go directly to the product page and discount page. Since not all products have their own discount pages, I don’t know how to make the button adaptive. If there is a discount page in the data, there will be an additional discount page button next to the product direct page button. If there is no special discount page, the product direct page button will be displayed separately. I want to know how to set.

Assuming your data looks like this.

Product Name Code Product Page URL Discount Page URL
Product A ABC123 https://example.com/a https://example.com/a/discount
Product B DEF456 https://example.com/b
Product C GHI789 https://example.com/c https://example.com/c/discount
Product D JKL012 https://example.com/d

Is this what you want?

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.