A/b button conditions

I have searched everywhere I can to find an answer but nothing was a clear cut “how to”.
I have 11 a/b button pairs set up, workflows set, B buttons are not visible on page load.
The A buttons require a one time payment before granting access and the B buttons just grant access.
I want to set up the conditions on button A that the user only “sees” it the first time and once payment has been made only “sees” the B button thereafter.
Step by step how the heck do I set up the conditions please? I’m lost.

Hi @porchecherry - here are some thoughts to help you.

  1. For each of the 11 buttons “Ax”, I’m assuming the “state” of the button is “persistent”. Meaning if Button A1 is pushed and the page refreshes, you want your app to know that Button A1 was pushed. As such, you need to have a data field for each of the 11 Button Ax to store the state of each button. You can setup the data field to be Field Type of “yes/no” and set the default to “false”. If my assumption is wrong and the state of each Button Ax does not need to be persistent, then you can use Custom States (I can explain how to do that approach too)

  2. In the workflow for when button Ax is pushed, have the workflow hide that button. You’ll also want to set the Data Field for that specific button to “yes”. You’ll have 11 similar workflows, one for each Button A

  3. Add a conditional for each Button A which will look at the Current Page Thing’s Button Ax to see if it’s “yes” and if so, make it invisible (Note - depending on what Data Type you put the Button Data Fields, you might have “Current User”).
    You actually may want to have all Button Ax invisible on page load and have a second condition for each Button Ax that if Buttons Ax is “no”, make the button visible. That way you’ll eliminate a quick “flash” of the Ax buttons being visible on page load when they should be hidden (ie their value is “yes”) (I added that to the image below)

  4. Add a conditional for each Button B simply put when the corresponding Button Ax is hidden (see image below)


Thank you!

I’m trying to finish the conditions on my A buttons but I can’t find the “current page thing’s”
B buttons are all done, data field set as yes/no

@porcheberry - what’s the Data Type for storing the “state” (yes/no or true/false) for each of the Buttons? In my example, my Data Type is “Thing”. Yours could be User, ApothecaryButton, etc. You need to set up your Data Type first. Then in the Data Type, you need to create a new Field, one for each Button.

Also make sure the Type of Content for your page is setup as “Thing”

Then when you go to the Button’s Conditional, you’ll be able to make the selection

thank you. Question that probably has an obvious answer: Where am I looking to set the page type?
I cannot recall ever seeing it.

never mind I found it by accident lol

I don’t know what it wants with the new issues…

It looks like you’re trying to link to a page that expecting a data object, and your link isn’t sending any data. That’s my guess without seeing more details.

1 Like

that sounds about right. I just don’t know how to fix it.

I’m assuming you’re clicking these buttons and the workflow is sending the user to another page in your app. Whatever page(s) those are have “Type of content” with a value (“Thing” in the example below)

In the workflow “Go to page” step, you’re probably seeing something like below for “Data to send”. You’ll need to select the right one, ie the data you’re sending in this step needs to match the data type of the page you’re going to.

once again I’ve hunted high and low before adding to this thread.
B buttons are not visible on page load, A buttons are. Conditionals and data fields are set exactly as you laid out and I made sure I brought them to the front. When I go to preview the A buttons seem to be invisible. Thoughts?

Hi @porcheberry - can you share your app design either here or DM me. Thanks!

1 Like