I hope someone will help me with what I thought was a basic Cross-docs setup
I am trying to create personal docs for different people by importing their data from a master doc using Cross-doc. Here’s a typical use-case:
Master Doc contains a table referencing people and their individual skills and their ratings. 1 row = 1 person + 1 skill + 1 rating for that skill, so a person appears on as many rows as they have skills.
Person X’s doc is supposed to only show that person’s skills, which would be imported from Master Doc via Cross-docs. I tried using a formula for the sync filter: People.Contains(User()). This works in the preview, but when I hit “Apply changes”, the sync table doesn’t show any records.
Is this normal behavior ? I have over 160 users and do not wish to manually set up each person’s doc by explicitly filtering for their username.
Unfortunately the same thing happens when I try your method : the filter works in the preview (showing only the current user’s info), but the sync table shows no records.
I don’t think this issue has been raised anywhere: is this because User() is not supported with Cross-doc by design, or is something wrong with my setup (enterprise doc maker) ?
It would be a dream come true for many if that worked. I can’t tell you exactly why it doesn’t work, but that’s the reason you can’t use Coda for Client Portals at scale, you have to create one doc for each one of them manually and set up cross doc accordingly.
But you are totally right, the preview at the moment is misleading, it should give you a hint of what’s possible and not. Maybe open a bug post?
you may consider to add a column (manual) tot the sync table in the target doc and show in tha t column the email address of the user via a formula, then you can set a table filter on user().email.contains(thisrowuserEmail) .
with this suggeston I am out of option and as pablo wrote it is a serious barrier in scaling with coda
Ouch… I wasn’t expecting this kind of limitation, especially on an enterprise plan which sounds adapted to entreprise size complexity
My understanding is that the data would be imported into the target doc and then filtered within it. It would work, but would defeat the purpose of creating many many documents and setting Cross-doc : I might as well just have one doc, containing a hidden database and a view of the database filtered for the current user. Which comes at the expense of privacy and confidentiality as I’ve tested and seen in other posts : the filtered / hidden data is in fact visible via the search bar, user activity, history, shared links, etc.
Ok I am going to have to rethink my entire roadmap and will open a bug post.
Thank you Christiaan and Pablo for your answers, much appreciated!
indeed one would expect this kind of filter to work before the data is send to the target doc, good point to raise this issue, certainly since you are representing an enterprise client. please keep us posted on any follow up may there be one!
Hi @Khalil_Z
If each user has its own Doc, then you should use a canvas variable with the user name (hard-coded) and use that variable in your formula. You make copies of the Doc and change the user name in each copy. If the number of users is low , this is “manageable” but not ideal. Imagine you want to change something how th Doc shows stuff, add a new feature: you now have to manually update that in as many documents as users (since there is one doc per user). 160 users is HIGH : you don’t want to create 160 separate Docs…
A more scalable approach is for everyone to access the same Doc (or a synced page in a personal doc) but have everything filtered using the people.contains(user()) as a filter. The biggest issue here is ensuring people can ONLY see their own records so there is some tinkering / triangulation with page locking, table options and user permissions. It is not 100% foolproof/secure and I am sure someone like @Paul_Danyliuk would be quick to hack it and reveal data that he is not supposed to see.
A VERY useful trick to test your Doc I’ve learnt from @Paul_Danyliuk is instead of using user() in your filter, you create a canvas variable e.g. called SeeAsUser. The default value of SeeAsUser is user(), but you can change it to User A so you can test what user A would be seeing if you were logging in as User A.
So your filter formula would be people.contains(SeeAsUser)
I have tried something similar and found that any value specific to a user will not work in a cross-doc sync filter. What I had tried was to use a value from a personal control in the filter and that didn’t work. My guess was that the sync is executed server-side and so doesn’t have any information related to logged in user
@Paul_Danyliuk I would be very grateful if you have any tips on how to “Cross doc sync” current user info from a master doc into :
a single doc that only shows the current user’s info, or
into multiple personal docs that show each person’s info in their doc, without having to set them up manually.
And also if you can tell me how one could reveal data that they shouldn’t be able to see : I have a couple of methods in mind and privacy is an issue, so I want to make sure I don’t have any blind spots.
I have tried this the day the CrossDoc filtering became available and I could not get it to work either. After checking with support it has been confirmed that it works this way by design - no workarounds available.