SQL Custom filter in Metabase not show custom field with use [[ ]] to - metabase

I'm trying build a custom filter based on a string field. In my case I try map a field "nome_setor" in other table. If I try use variable with a text field works fine:
If I change this for a custom field using another table not works. In this case not show the filter:
Thank you in advance.

You can't use custom fields when you compare it values with some other column.
For you case to work, remove the table alias from the custom field you gonna use, and define your conditional snippet like so:
[[AND {{hithere}}]]
Now when you select the custom field, it should work. But you LIKE won't.
Hope it helps

Related

Calculated_SQL Table - Search

i have done a calculated sql with a custom query.
Implemented a table from that data model.
Until here we are ok.
My problem is the next step:
In my custom query i have a field concatAll(that is all fields concatenated).
In my page i want to put a search box to do a "contains" search in my field concatAll and present those results in my table.
Anyone knows how to do this?
Tried multiple approaches, but could not have the result.
Thanks
As #Pavel Shkleinik send to me this is possible using :params in the query of calculated_sql.
Example:
or (c.phone like concat(CONCAT("%", ifnull(:concatAll,''), "%")))
and you put concatAll as a string parameter on datasource page.
Regards

Custom field data input wenzhixin/bootstrap-table

Hi! I want custom field data, because I have many arrays in one array.
I try using field: 'LeftNavigation.Title' but it didn't work.
You can't using multi Array data in field
Maybe you should choose another solution for this
Suggest : Create Leftnavigation Field , when click on this field it's show a second table show data from Leftnavigation array

Silverstripe custom display rules—how to use the value of a select?

I'm trying to have a select field, and when I select an option, I want a second select box to appear.
The problem is that select fields don't have a value like text fields do. So, any comparison SS provides will fail—always thinking the select field is ''.
Is there any way to compare the value of a select field?
Use display-logic
Disclaimer: I'm the author
Use DependentDropdownFields, I found it easier for dropdowns than Display Logic for this case. (Sorry UncleCheese)

Multiple Field types of fields in Symfony2 Datatimepicker & filter

I'm trying to work with the bundles :
https://github.com/lexik/LexikFormFilterBundle
https://github.com/stephanecollot/DatetimepickerBundle
So I've a filed of my form with to apply a filter acordin to this field
->add('fecha', 'filter_date_range');
Now I wanna add another parameter because this field is a data then I wanna see a datapicker so I need to apply another parameter here like
->add('fecha', 'filter_date_range collot_datetime');
But this not works so, are there some way to implements the both bundles in a field?
This can not be done out of the box - field can have only one type.
If you need to customize form field type you can create your own: http://symfony.com/doc/current/cookbook/form/create_custom_field_type.html (based on these two)

getting textfield output partly unvisible

In a Drupal content type a need to get the output of a field partly unvisible. These are bank account details, the IBAN.
Normally the field shows 1234567. I need to get xxxx567. I need to show only the last 3 numbers/letters.
Also I need this output in field edit form.
On the display end you could change the output using a simple PHP function in the theme template by grabbing a substring of the field's last three digits and concatenating it with "xxxx" before printing.
You might also consider doing this at the formatter level by using the 'custom formatter' module perhaps?
https://drupal.org/project/custom_formatters
To do this on the edit screen is trickier. I suppose you could do a hook form alter to use PHP to change the field value, but I am afraid you will rewrite the field value when you save the node with the 'xxxx' instead of the real data.
I wonder if it would make sense to 1.) hide the actual field, 2.) create a dummy field that displays the text formatted as "xxxx567" to the user, and 3.) write some javascript that populates the hidden field with the visible field's value if it is changed. Presumably the form would still throw values if the hidden field did not meet formatting requirements.

Resources