I am interested in the Linkkey feature because I want to use it for the following application:
Inventory list of all components
Linkkey link should be exported as QR code and put on each piece of inventory
Opening the link shall bring me to the inventory list, but only show me the single piece of inventory for which I can then change location or other items
Note: For internal reasons, we use a self-hosted Grist version for which public access is not possible. However, when I try using Linkkey as internal (or logged in user), I do not only see the item with the UUID in question, but I see the whole table.
Yes. However, if you’ve invited a user to a document (directly, or via a shared workspace or site) as a viewer or editor, you’ll need to add access rules to shape what they have permission to do. Sounds like in your case you want them to have access to nothing but what the link keys control? So you’d need some rules saying “by default, viewers and editors can’t do anything with these tables.”
thanks for the response! Unfortunately, it is not that easy (or maybe it is and I just don’t see it):
What makes things more complicated is that logged in users have in fact different rights.
Via a coworker table, they are assigned to a specific inventory via a reference so that they can edit all parts of an inventory.
Example:
Large inventory = distillation plant
smaller parts = temperature sensors, pressure sensors, etc., which are part of the large inventory
So users already have varying access or rights on the editor level to modify what they are allowed to modify. The problem with that is that the rights given by the linkkey seem to be augmented by these editor rights. Hence, the link to the UUID does not result in a clear row of the linked part or a limited view, but only leads to the whole table of parts they have access to.
To play around with that, we have disabled the enforcement of SAML login and found a solution based on the article linked above, but I thought a solution in which a link always point to a specific row or shows a reduced view would be more elegant.
In simple terms: the link shall be (e.g., in the form of a QR code) put on a specific part so that anyone wondering what exactly this is, would be forwarded to the specifics of this part - regardless of whether they have full editorial rights or not. Maybe using the Anker Link Feature would be better for my application, but I haven‘t found a good example of how the Anker link is generated automatically for every item.
Hmm. Brainstorming: You could change the access you have given to “turn off” if a UUID link key is present? Or you could change the link you make to be to an anchor link to a page with just a card view? (You can make anchor links with formulas.)
Hi, sorry for the late respone but I haven’t had the time to try it this week.
Partially good news: I got it to work by using the following code:
def GET_ANCHOR(ref):
"""
ref: a <class 'table.Table.__init__.<locals>.Record'> object
typically returned by Table.lookupOne or contained in a Reference column
"""
return f"{SELF_HYPERLINK(label=$UUID,page='data')}#a1.s2.r{ref.id}.c1"
ref = Inventarliste.lookupOne(UUID=$UUID)
GET_ANCHOR(ref)
This solution is basically taken from here: Anchor link for every record
It is not perfect (because one can of course see the other items when logged in so that you might switch the row and confuse items), but I would be satisfied with that.
Regarding your second suggestion, I am not sure how I would do it - and also if that’s what I wanted. I would still be interested in the implementation of that, maybe it will help someone else or myself in the future.