Send a selection of a repeating group to another page via url

Hi bubblers,

I have a repeating group on a page (search results) and want to send a selection of those as a link to a user. Basically search the repeating group. Tick a box for every “thing” I want to send, click a button which creates a url.

I know how to send search parameters but they are dynamic. I will need a static list of “things” to send. Will something like this work using the “thing” id?

http://url/?id=123,456,789,.

I don’t know if a parameter can have multiple values. Also the list could be quiet long so a more elegant solution would be preferred.

What will be the best way to achieve the above?

How will the user see the results? Also in a RG?

Perhaps you can create another field in the table for ‘search results’ and make it a list of the Thing you are referencing.

Then the search result for the user will be a RG where a constraint would be something like unique id contains search result list of id’s?

Yes, Also in a RG. I need to get my head around List of things. Is it like a one to many relationships in field of a table? Also, can a list only be stored in a table or also temporary on objsects?

If so I might create a table just for operations to store temporary data. Could even call it settings and store user settings and such?

Would that be good practice?

You can create a custom state for almost any element and make it a list of Things yes. You can use it to store data during a user session (and only available to that user)

Work your way through this topic and you’ll probably know all you need to know about this:

1 Like

Thank you @vincent56, this is interesting. Will read through it right away. :slight_smile:

I still have a problem I don’t understand. I have a button which sets the numeric state “hide” of a popup to “1”

image

The popup will show according to the screenshot.

image

It does however show all the time when I refresh the page. I tried yes/no, text, and now numeric.

Where am I going wrong?

Thank you @vincent56 This is a great solution. Just one more question, If I store the data in a database I will need a unique record for every time data is sent as the same user might send different selections to different users during a short period of time. This can result in a lot of records being created.

Is there a way to send the data dynamically in the url without creating a record for every search? I am afraid that too many records will slow display after a while.

Sorry, what data exactly?

A selection of records from a boat database. The idea is to make a search and then have the user select a subset of those records (tickbox). Then the user forwards a link to another user who sees the selected records in a repeating group on a different page. Do I make sense?

Yes, in this case you would need an entry in your DB. You can make a field that is a list of texts or a list of the Thing you want to send, probably the second.

You will save the records in a field like ‘records to show to the other user’, the other user will then look at a page with a repeating group that has that field as a source.

But there are so many ways of achieving this, it all depends on your use case. You could also add a field to the actual boat record database of ‘view’ that can be a yes no or maybe even better: a list of Users.

Then you let the user log into the other page and your RG’s data source would be: Do search for boat records with constraint: ‘view’ contains current user.

Does this make sense?

Yes, makes total sense. Since every search is kind of unique and one user does send multiple searches I am probably better of using a separate thing (search) which includes a list of things (boat records) and a user. I can then send the search Id with the URL and extract the user and boat records on the receiving end.

Thank you very much for your help. It is clear now :slight_smile:

1 Like