Filter where not working

this filter where it doesn’t work. any suggestions ??

Hi @Maxr167 ,

Have you tried something like this below?

$query->like(“cliente_technico_ass”,$auth()->user()->username);

Thanks,

hi jp,

thank you for your support. It gives me an error.

Use of undefined constant “cliente_technico_ass” - assumed ‘“cliente_technico_ass”’ (this will throw an Error in a future version of PHP)
ErrorException
C:\laragon\www\test\php-laravel-api\app\Http\Controllers\ClientiController.php
29

@Maxr167 please use the following code.
$query->where(“cliente_technico_ass”, "LIKE", "%".auth()->user()->username."%");

already tried anyway returns error

Use of undefined constant “cliente_technico_ass” - assumed ‘“cliente_technico_ass”’ (this will throw an Error in a future version of PHP)
ErrorException
C:\laragon\www\test\php-laravel-api\app\Http\Controllers\ClientiController.php
29

@Maxr167 please send me your teamviewer details, so that I can check what might be causing the error.

thanks Willvin the solution you work properly

$query->where(“cliente_tecnico_ass”, “LIKE” , “%”.auth()->user()->username."%");

This is the code that worked for @Maxr167.
$query->where("cliente_tecnico_ass", "LIKE" , "%".auth()->user()->username."%");

What @jp26198926 and I previously posted had a quoting error.
The quotes used here was the wrong one.

This is the correct quotes to use " or ', and this is the wrong quote .

1 Like

hello, I had already asked and renewal: can this type of filter be added to “Record Management”?.

@Maxr167 the Record Management allows you to limit a page record to a specific user. In other words, users can only see records added by them. This is similar to this Adding User Record Management - Documentations (radsystems.io) in PHPRad.

of course! for the “User Records Managements” filter does not apply “% LIKE%” so the filter is limited. In my case there are more strings in the field and without the “% LIKE%” the “User Records Management” filter cannot be used.

@Maxr167 Yes. In such cases, you can use the where configuration as you did. Radsystems Studio tries to provide everything necessary for an app and creates room in some areas to add things not provided by the Radsystems Studio app.

I share your opinion.

Please, this issue has been worked on as of version 3.5

Thanks