So I have a read-only grid displayed on a site through an interface. The summary is also displayed through an interface, and the summary of a record is pictured below.
What I want to do is add a button, going to the next or previous record so that the user doesn't have to click the home button in the top-left.
I found this thread but wasn't sure how to apply it to my situation (not completely sure how to apply a!query):
Discussion posts and replies are publicly visible
Did you read the answers I provided in the therad you linked? What exactly are you not able to figure out? FWIW the answers I'd give for this question now are no different from what I answered there, except for adjusting as needed for data sourced via Synced Records instead of Query Entity.
Yes I did, I don't understand where to put the a!queryEntity in relation to the button(s), and also how to create a datastore for the entity. I am using a record type but I'm not sure where to get the datastore from
ascending: if(ri!fetchingPrevious, false(), true())
operator: if(ri!fetchingPrevious, "<", ">"),
davinar9817 said:I am using a record type but
Then you'd just use queryRecordType instead of QueryEntity. Everything else should work essentially the same.
davinar9817 said:I don't understand where to put the a!queryEntity in relation to the button(s)
As I wrote in the other thread, you will need to use Links for this, as Buttons have no way to do actual Record Link functionality which is what you'll really want to use here. As for where to query the data: you would query it with the other local variables at the top of the form - basically just to get the identifiers for "next record" and "previous record". Then you would place your links wherever you want - on the bottom, at the top, in very tiny columns on the sides, etc... that's up to you.
Mike Schmitt said:Then you'd just use queryRecordType instead of QueryEntity. Everything else should work essentially the same.
That makes much more sense, that's a big part of why I was confused
Mike Schmitt said:As I wrote in the other thread,
Alrighty I will try this now, sometimes being a beginner makes me feel really inept for things that should be simple like this.
No worries - I was a beginner long enough ago that sometimes I forget how confusing things could be. Things are certainly better these days though, lol.
Anyway in case it helps, here's an equivalent example of the "previous entry identifier" query from the older thread, but converted into a!queryRecordType() style funcitonality. Note that the changes are mainly to formatting / semantics, while the functionality / idea largely remains the same.
© 2023 Appian. All rights reserved.