I’m trying to make the page that is linked by a button in a RG be dynamic based on information in the cell? Is this possible, or is there another way I should be trying to accomplish this?
The page the user would go to for grading Test 1 is different than the page they would go to if grading Test 2. So I would like if the RG cell is for Test 1, when the user clicks the blue Start Grading button it would take them to the appropriate grading page. Screenshot below. I have also seen requests for access, but not actually sure how to do that. Let me know if you need that to help and I’ll figure it out
You can make a link element look like anything you want it to…so you can add a link instead of a button and design the link to look like a button by changing background style etc.
Then you can use the function ‘websites home URL’ then add the page name and the other information you may need to direct the user to the correct user.
For example, if you have a page named ‘grading’ the URL would look something like www.myapp.com/grading
My assumption is you are aware of how to set the page to use the path information in the URL to populate the page with the necessary data…so all you need to do is set the link up to be to the website home URL followed by page name followed by slash followed by path
websitehomeurlgrading/test1
However, the path is the dynamic part picked up from the RG cell…so, however you store the test number data in your data type is how you would reference your test number…my thought is you have a data field called “test number” on the data type used in the repeating group
@boston85719 Ok after looking more into this, I don’t think this is exactly what I need. From my understanding this would allow me to send a user to a page and would tell that page what to load.
The distinction I am looking for is that I need the button to take the user to entirely different page based on what is in the RG.
Seems to me like what you are creating is some kind of application for teachers to grade students work.
From the screen shot of the repeating group I can only make assumptions about what you are creating and from that assume you are creating it in a way to help you achieve your goals.
If I were to be creating an application to allow a teacher to grade students work and I had a data type called “student” with another data type called “test” and the student data type had a related data field for test which would be a list of tests and I had a repeating group on my page that was of a data type student to show the students picture, name and latest test submitted and I wanted to have a link to a page that is used to grade that test, I’d first have to decide if each test would be graded on the same page using dynamic data or would each page have its own separate static page.
Most people would choose to have a single page with dynamic data and name the page something like “grade-test”…on that page because of the need for dynamic data they would need some way to tell the page what dynamic data to load…there are several ways to do that, one of them is to use URL parameters, URL path but some people prefer to send data to page.
Sending data to page puts you in the position of needing to create the page using a data type which is the same type of data you would eventually send to it…using URL parameters or URL path doesn’t require you to make the page of a certain datatype but you would need to make a group of the data type and use those URL details to set that data source.
Then you would need to have your database set up correctly to be able to keep track of what you are using to send to the URL which in turn is used to set the dynamic data type data source.
For example, I have a blog. The database has a data type called “blog” with a data field called “ID”…I have a dynamic page called “Blog”…I have a group I set to data type “Blog” and I have a “do a search for blog whose ID equals the URL path” so that the URL is ‘read’ to find the ID of the blog in the URL to set the data source of the group on the dynamic page to load all the data concerning the specific blog post whose ID is in the URL.
In your case my assumption is you have a dynamic page with a group set to be of data type “test” and would be able to have in your database a datatype of “test” with a data field of “ID”…so if you set a link to point to the dynamic page “test” and use the URL parameter or path to set to the “ID” of the latest test updated by the student in the Repeating Group, you’d be able to access all the information concerning that test you want to grade.
If you are not creating a dynamic page to do all of the grading no matter what test is being graded and instead are taking the grueling task of create static pages for each test, then you need to but on the data type of test some kind of text data field that would be titled something like “URL” and then have that ‘link’ in the repeating group point to the most recent test uploaded URL.
Thanks for the thoughtful response. Unfortunately, I am currently going through the grueling task of building each grading page. There are only about 15-20, so it isn’t terrible, but I am definitely open to ideas of another way of doing this.
Context: A test is a student recording themselves reading a passage out loud and submitting the audio recording for a teacher to review. The teacher listens to the audio and clicks the sounds that the student is saying incorrectly. Each of the little red transparent boxes are possible errors. Each error box represents a sound that could be incorrect. The reason I feel like I have to make each page individually is to create the little red error boxes over the words. (screenshot is of 1 grading page.) Each test has a different passage to read and different sounds (words) that a student could pronounce incorrectly.
Any ideas on how I could better accomplish this? If there were a more dynamic way to do that we might also solve the other issue.
On that page I would have groups that are set to data type “test”
To set the datasource of the group I would "do a search for test - constraint - ID = Get data from URL parameter ID "
What this will allow for is the group to be set to the test that has the same ID that is in the URL so that you can use the links as we discussed.
So on this single page, you would have 1 group if you are going to make the data concerning errors dynamic — in the database for that particular test for that particular question you could create a data field that is a list of possible errors — this of course would take some time to ‘map out’ the database to correspond correctly
IF you already have a database set up which is causing you to use 15-20 static pages, this single page could have 15-20 groups and create essentially a ‘single page app’ within your app…single page apps have groups that are aligned vertically and are ‘set to collapse height when hidden’ and have conditionals on when to be visible or not visible (‘hidden’ or ‘not hidden’)
This way the groups do not affect the height of the page when they are not visible…so each of these 15-20 groups could be static to make life easier in the case of a database that is already set up to necessitate static grading pages. Think of the 15-20 static groups as a replacement for the 15-20 static pages…then your conditional on when to make the group visible or not visible is again based on the ID value in the URL
Hey @boston85719 could you please elaborate on this one? I am not aware of how to set the page to use path information in the URL. I mean I know “Get data from url”, but I think that only works on “?” parameters.
Also, could you suggest if it would work for structures like home/category/sub-category/tag/item-name kind of multi level url?
I would create a page to test sending URL path parameters to try to understand how it works. There are three different URL set ups, parameters, path and path as a list. Play around with them to get an understanding.
Most of the threads that I have seen on this point to the Sudsy or Router plugin.
I suppose you are not referring to those. Are you saying “path as a list” is a bubble feature? Could you point me to some documentation on that? I only know of query parameters.
Thanks very much @boston85719. I didn’t know of these other options in the dropdown of “get data from page url”. I had used “Parameter” from it a lot, but never realised it was a dropdown where other options are also there.