QGIS 3.26 - Field missing in field calculator - qgis

Screenshot to clarify the problem
I'm trying to use the substr function in the field "Municipio" to create a new one called "Código" but even tough you can see the field Municipio in the attributes table, the field calculator doesn't find it.
In the screenshot you can't see the reason of the error but it is: 'Field "Municipio" not found'
Does anyone know what I am doing wrong?

Short story - you have to put the field names in quotes.
It is better to select the field names for formulas from the list (expand e.g. Campos y valores) to the right by double mouse click and thus avoid typing errors.

Related

iText DITO - How can I use a fields Data name as a reference in a calculation?

In iText's DITO template designer product, I have one field which has a fairly complex calculation. In another field, I want to use the result of that calculation.
The tooltip says "Identifier used for referencing fields in calculation expressions". So I assumed if I named it blah I can use it in a calculation in another field like this: sum({{blah}},42) (e.g. add 42 to the value of blah). But if I do that I get the error
Unable to resolve reference: "{{blah}}" in node with tag: <span> and text:
The iText DITO documentation does not elaborate on this feature at all. I'm evaluating iText DITO and there does not seem to be any way to get support while evaluating the product.
Suppose I have a field with a very complex calculation. In order to reuse the calculation result, I can do the following:
Give a name to this field (in the image below I've chosen name "total")
Insert a calculation to another field (where I want to reuse "total")
Add "total" as the calculation's body:
That's it, now the total value is reused:
I think the documentation you are looking for is at https://kb.itextpdf.com/home/ditokb/latest/manuals/itext-dito-editor/calculations
You have to give the rich text element a name in the properties to be able to reference it on other rich text element and/or calculations.
See image example at https://kb.itextpdf.com/home/ditokb/files/latest/68620314/68620309/1/1660291029000/image2020-5-27_17-56-41.png

How to fulfill blank fields in Open Refine?

I found the blank rows, that is already great. Now I want to type "Not informed Value" to all blank values, but I don´t know how, Any hints.
Thanks in advance! I am having a great fun working with this distributed community!
Joni
Use "facet by blank-> true" to isolate the blank cells, then click "transform" on the same column and type the text you want between quotes.
It's also possible to perform the operation with a GREL formula (using "transform"):
if(isBlank(value.trim()), "Not informed Value", value)
Finally, since Open Refine 2.7, you can apply this kind of formula to each columns at once. Just click on "All -> Transform" and use the formula above.

FileMaker Script to Hide Object

I want to ask. If i have 2 Field in FileMakerPro 15. Accesories and Accesories Type. Accesories is a Field Using Checkbox. the valuelist in the checkbox is Mouse Printer And Scanner. What script must i input to make Accersories Type Field from hidden to show up when Printer or Scanner Record being checked in the checkbox?
Sry for my bad english and bad explanation anyway and Thx before.
No script needed, assuming you are using a relatively new version of FileMaker.
Set up a hide condition on your Accesories Type field, so that it will be hidden when Accesories is either Printer or Scanner, like this.
FilterValues(Accesories;"Printer¶Scanner") ≠ ""

How to use Parameter field in a record selection "like" statement?

I have designed a report to pull data fields based on a record selection formula that uses a "like" operator that looks for a substring match in a particular field's data, as so:
{rct.serno} like "*9842*"
(due to the free-format way data is stored in the given field, I have to do a substring match to find the relevant rows in the DB.)
This works fine. Instead of manually editing the record selection formula every time, though, I thought to use a Parameter field ("{?TagNum}") to prompt the user for the desired string, and then use that in the record selection formula like:
{rct.serno} like "*{?TagNum}*"
Crystal does not throw an error when I save this record selection formula, but it does not return any records after the report is refreshed, and a parameter value is entered. How can I properly use the parameter value in a record selection substring match?
You're really close to the solution. You can modify the formula in the Select Expert. Just click the Select Expert icon (or from the Report menu). Then click the Formula Editor button. Concatenate or add an asterisk onto the beginning and end of the parameter using the + operator, like this:
{Customers.LastName} like "*" + {?pLastName} + "*"
Let me know if that helps.
~ Nathan

Setting the controlsource value of a listbox using Properties Window

I am new to VBA and am currently still studying the most basic ideas of the language. I haven't gotten that far in my VBA Code studies to write the code I need by hand, so, in the mean time, I have been using the VBA Editor to enter Property Values via the Properties Window. This has been proving far more difficult than I anticipated. My Goal is to create a drop down list for a VBA Form. I understand one of my options is to reference a range of cells in my excel worksheet by inputting it into the value field located right of the ControlSource Property. My attempts to input the desired range always comes up with the same error:
Could not set the ControlSource Property. Invalid Property Value.
I have tried looking in the VBA Help files and even searched online. I haven't had any luck finding the proper syntax to enter into this field.
I am assuming I may run into similar issues as I try to set other property values through the Property Window. Thus, I am diligently studying my VBA courses so I can simply write the raw code. But that takes time and I need this form to work as soon as possible.
Is there anyone out there that wouldn't mind lending me their brain for a moment? I would be most grateful. Having this working would bring a lot of stress off of me.
Thanks for reading!
What tigeravatar mentioned, works fine for me, for the ComboBox as well for the ListBox.
If I enter =a1:b5 into the ComboBox' RowSource, I see the values of the cells if I open the form and the Combobox. Tigeravatar's notation with $ and sheet! may be more reliable for the productive version.
The RowSource is where the boxes get their displayed items from. The ControlSource is where the chosen value finally is linked to. So if I write just A10 to the ControlSource, then open the form, then pick a value, close the form, I see the chosen value filled to the Excelsheet field A10.
Sometimes it helps to start a fresh UserForm and to add some simple fresh controls. If you seek around, you will probably alter property values that influence the behaviour in an unexpected way, and then you get lost. I have tested with Office 2010. If you have another version, it may be important to forum readers to know.