Forum Academy Marketplace Showcase Pricing Features

Can a single link divert to different pages?

UPDATE I think I may have figured this out. I will test some more and post the solution when I am sure it works.

I originally posted this question here but after further investigation I am able to explain more succinctly.

I have a single page app which is made from groups which are either shown/hidden. There are no pages, only groups. We have a group for settings, contact, about me etc.

One group is called “my-customers” and lists the Users customers in a RG.
When a customers name is clicked from the list, I hide that group and show “customer-details” (to display more details on that customer).

I have an invoice page and users can attach one of their Customers to that invoice. When they click ‘attach customer’ they need to go the same list of customer, ie. “my-customers” and this time, instead of showing “customer-details”, it needs to show the “my-invoice” group.

This may be possible using CustomStates but I have tried every which way. Could someone tell me step by step how I can achieve the above?

Thanking you in advance!

1 Like

The thing I find confusing about your post is that it sounds like they click two separate buttons. In your first scenario, you say you click the customer’s name which shows the customer-details group and in the second scenario they click the “attach customer” button but your title says “single link”

Can you clarify?

Ah, I see the confusion, sorry I could have worded it better. What I mean is that the customers name (on the customers repeating group) needs to link to two different ‘pages’ when clicked, hence the title ‘single link divert to different pages’. I know this is possible because I achieved it earlier, although not had time yet to work out how I did it (I was throwing everything at it!). I will post here when confident I have the answer!

Oh I see now.

Have a state on your invoice group called clicked-attach and set it to a yes no value and set the default value to no. When they click the attach button, it first sets the state clicked-attach to yes and then hides the invoice group and shows the customer group.
Then your workflow when they click the customers name in the my-customers group, the workflow will be “show customer-details only when clicked-attach is no” and the other workflow is “show Invoice only when clicked-attach is yes”

I can get the customer name to link to two different pages based on custom states, but the Data I need to pass through won’t work. Here is the set up;

When the main navigation link going to the Customers RG is clicked I add a custom state From > myCustomers

When the link on the invoice page goes to the Customers RG I add a custom state From > invoice

Then, when we are on the Customers RG and we click a customer name, we go to the extra customer details by adding only when index's From is myCustomers


Or, when we are on the Customers RG and we click a customer name, we go to the invoice page by adding only when index's From is invoice


This does work, but now comes the Data. I am displaying data from the Customers RG as below. And, for the invoice page I just created the same Display data but added the ‘invoice’ state.


So, the customers RG has the following workflow on the customer name;

As you can see, I am trying to create a link to two pages and to send data to those pages. The data won’t send though?

Just seen this after my last post. Ok, thank you I will give this a try. I see exactly what you mean and it’s a great solution but there’s a small issue. I tried to keep this forum post simple but suggested that the customers name will need to link to two different groups, but in reality there are many places that the customer name needs to link to, so I can’t use a yes/no function, I think I will need Text so I can refer to many groups. However, your answer has made me slightly clearer on what needs to be done so thank you very much. Any other thought greatly appreciated as I am still not quite there.

Thinking about it, perhaps I can use yes/no functions for multiple pages. I suppose my customers RG link could have a condition which says;

Show GroupA only when clicked-attach is yes
Show GroupB only when clicked-attach is yes
Show GroupC only when clicked-attach is yes
Show GroupD only when clicked-attach is yes

This should work because I am setting the group state when we click through to the customers RG page. It’s late here so will have to try this tomorrow but I feel I am getting closer!

You can use two states. One state to store the selected Customer, and another state to store the selected Group.

Then set the data source of Group attach to Group myCustomer’s selectedCustomer, and any other groups you want, so that you don’t need to “Display data” for every group.

When the attach button is clicked:
Set state selectedGroup = “attach”

When a customer name is clicked:

  1. Set state Group myCustomer’s selectedCustomer = Current cell’s customer
  2. Show Group details only when selectedGroup is empty or “details”
  3. Show Group attach only when selectedGroup is “attach”

Thank you, I will give this a go.

Thank you Ed for fixing this issue. For the benefit of others, I will explain the solution. Reminder: I needed to go from “my-customers” page back to different groups based on where the user just came from. A group is like a page in my single page app.

The index page has two custom states added previousGroup and selectedCustomer.

If I go from the group “create-invoice” to “my-customers”, we add the from information to the previousGroup custom state so it knows where to send Data back to.


That get’s us back to the page we came from. Now, on the main “my-customers” group we add the following;


Notice that we are now sending the Data as selectedCustomer (Parent group’s Customer). That gets the correct customer back to the previousGroup.

Because the customer’s name goes to ‘customer-details’, Ed added another (default) state which directs the user to “group-customer-details” Only when index's previousGroup is empty


1 Like

Hi Ed, just checking in to see if you’ve been able to review my latest ‘to-do’ list?