Hi,
I have a database with an applications, reviews, and users table. Users are reviewing applications so a review is linked to both an application and a user.
I have built a ‘My Reviews’ page that allows logged in users to see a list of applications they still need to review using the table element.
Unfortunately the filter I added to my application data source does not work as expected:
I would expect the filter to only return applications that do not have a review by the currently logged in user but it doesn’t return any applications.
Username
is a simple first name string like “John” in the Users table. The Reviews table has a formula field as the primary field which just references the value from the User field.
Can anybody point me towards a reason as to why this is not working?
Apart from that, making changes to the data source sometimes leads to my entire tab crashing (using latest Firefox) I can’t even cmd + r to refresh I need to close the tab and open baserow in a new one.
For the amazing simplicity in building apps on top of your data, I have to say these two issues have been quite frustrating
I’m wondering if the last update has introduced a bug as my login form has suddenly stopped working and it seems to be a similar issue. It has been working faultlessly until yesterday, but now after logging it goes to the main page of the application but its as if the user#id field is not being passed to the datasource. It shows the variables for the user, but the datasource which is filtered on the user#id seems to return nothing.
I also notice that when using the app in developer mode it works when manually selecting a user, but it takes a moment to populate the variables. I’m sure this was instant before.
When using it as a user it just doesn’t populate at all.
I’m pretty sure I haven’t changed anything that would affect it
Hi @luckyhmm,
I’ve tried to reproduce your issue on my end but the filter works exactly as intended for me where it only shows the records where the records do not contain logged in user.
Could you share some details on how you have set up that Reviews table? Also, how are you showing the intended data? Is it through a table? Could you share how that table looks in your app editor with the settings?
Hi @DataGecko,
Could you share some details of you are making use of that datasource? (What element(s) and the settings used for that).
Do you get any errors in the development tools of your browser?
As for the delay in switching between users in the app editor; I believe this slight delay is to be expected as it loads in token for that user.
@cwinhall
Thank you for looking into this Colin! Yes, here is pretty much the exact setup:
Applications table (hiding irrelevant fields)
Reviews table (actually called Simple reviews, filtered for Reviewer (User) Matthias)
Apologies for multiple posts but as a new user I can only include one embedd in my post.
Users table
Additional notes
You may notice that I introduced a Number (Autonumber) field. This is because I wanted to connect a new review form (form view) to an existing application and I couldn’t figure out how to use the row identifier in the form view.
In the UI the user sees applications in the table element (ideally showing only the ones they haven’t reviewed yet) and clicks on “Start new review”, which opens a URL to a new review form, using prefill to fill in the Application number.
I’m not sure this is the ideal way to solve this but this was my first baserow application and I didn’t have a lot of time testing other ways. I’d be happy for recommendations on how to solve this better, especially since I got feedback that it didn’t always work and prefilled the Application number in the new form.
Here is the page where the filter doesn’t work. The top table should show applications that the user hasn’t reviewed yet and the bottom table should show applications the user has reviewed.
Sorry, hope this doesn’t confuse the thread. I can start a new one if so.
I tested it a bit more… discovered it works if I go directly to the site at baserow.site but not if I embed the site into my own website (I’m using Google Sites), which was working fine before, but that is what has changed. So it could be related to the embed, which may be a similar problem to this bug I reported, but that was 7 days ago, so… maybe unrelated.
Sorry I didn’t think to check this. So its not the same issue as luckyhmm.
@luckyhmm I think I understand your requirement now and I think it’s just a case of using the wrong logical oeprator and parameter combo. Instead of using does not contain
try using doesn't have
and instead of using the username, use the id parameter instead.
This should get you the desired result.
@DataGecko It does sound as though it could be related to that. Perhaps you could make a reply in that thread about this new issue so we can keep it separate from this issue?
@cwinhall I actually played with those options yesterday but it doesn’t work. The screenshot below shows the data source returning a row that does contain the name ‘Matthias’ and I’m making sure I’m viewing as: Matthias.
Actually the only time it works is when I don’t use a formula (User > Id) but select a specifc row.
Also, everytime I change the filter, e.g. I change doesn't have
to has
it crashes the entire tab and I need to open the builder in a new tab.
Just wanted to leave a short update. After trying around this weekend I noticed the issue occurs when the primary field is of type Lookup or Formula. Changing Title in the Reviews table from Formula to Single line text field made the filter work as expected.
Thanks for looping back on this and letting us know.
I had initially thought the formula field might be the cuplrit so I did also set up my example using the formula field as the primary field as I had seen in your example, (although I couldn’t be sure exactly what formula you had used there) but it still worked fine for me.
I’ve still not been able to reproduce this on my side but from a technical level it makes sense as the formula field would not “flatten” a link to table element (relationship), so it would inherit that and it would essentially be an array. So making it single line text field (that would represent a string) should make a difference there.
For the record, if you want to use a formula that doesn’t inherit the array format, you can use the join() function. So it would be something like join(field('reviewer'),',')
1 Like