Forum Documentation Showcase Pricing Learn more

Multi-part ID'S in urls

Hi, I’ve been struggling with a loyalty reward points idea. I’ve had help from the community but I’ve since changed the idea from being just on one site to one site with multiple accounts.

So far the best I have is each signed up business account can generate a code that contains their ID, category and the reward value in it. This so when a follower registers the code the points will go on to that business account, who they are following effectively. Whatever user registers that code will have the value assigned to their account but showing as e.g. you have 100 points from Company A, whilst you have 350 points from company B, C, D., etc.

I’ve added a rough diagram. My questions are a) is this possible in Bubble? 2) How would I go about it? iii) can anyone please point me to the tutorials or categories I need to look at understanding the principles at work here?

Thank you in advance for any wise words

Yes this is bubble. I believe I suggested things on your prior posts…from what I probably said in the past, which was probably along the lines of having a database data type for “Rewards” which a business is able to create with data fields such as the value and category as well as their business ID which would be related to the business data type.

From there all you need to do is make it so a user has a data field which is a list of rewards, then you have an R.G. that a user can see in their account with all the rewards they have received when they follow a company. At the time they follow the company you need a workflow to add that companies reward to the users list of rewards.

Then your R.G. will have all the data from the rewards which would include the company, value and category.

If you have not, I highly recommended researching relational databases.

Hello again Boston85719 sir, yes indeed you helped me out only this week! And again today. Your comment has got me thinking clearer, and have helped. I’ve now got a few ideas I can play with but I will definitely need to polish up on working with relational databases. Thank you, yet once more!

1 Like

Ah, i’ve just learned that my actual question was wrong. What I am actually looking for it to be able to wrap a number of elements, such as an ID, a category ref and a value in a unique ID and then when this clicked on it is converted back to the values and updated in the database.

I wanted to mention this only in case it helps anyone else (who might have a peanut size brain like me :slight_smile: ) I have started looking at tutorials on URL parameters and I’m starting to get a better idea.

Add extra parameters using a & after the initial ?

www.yoururl.com?first=this&second=that&third=theother

(assuming I have understood you correctly)

Hi Nigel, thank you, and yes that’s kind of the concept, absolutely but what I need is to turn that into a unique ID so that users can’t hack the url, for example making value=10000 instead of value-10. I guess it’s the same as encrypting?

Aha, I didn’t understand correctly :slight_smile:

Can you create a unique reference each time and store the values on a table which you then read back ?

So when they land on your page, you read the parameter in on page load and then set custom states by reading back the table value ?

As an example … a short code id is passed to this page in the URL, which I then read on page load.

(Very excite) YES, I think that is exactly what I am after!!! Can that code ID represent multiple things, such as say a question, a value and the user-name who asked the question?

Wow - I feel like we’re close here!!! Woo hoo!!!

1 Like

Yes, there is a lot of information in Question.

But it can all be got to from one parameter…

http://sprrk.ly/version-test/landing?question=JT19vn5j

wow! Fantastic. I will definitely try this out - it certainly looks like exactly what I was after! Can’t thank you enough for taking the time to respond! Thank you sir! Thank you X 50!!!

1 Like