The expression that you are passing to arcpy.CalculateField_management() is not directly a value as such (either a string or a number), but rather a snippet of Python code to evaluate in order to get a value. The outer quotation marks do not delineate a string value within that Python code, but are rather the start and end of the actual Python code.
So you ...
If you have polylines stored in shapefile and call them "LINES" in your mxd table of content, below field calculator expression will populate numerical field of your points table by distance from relevant line start:
If adding new fields to your layer is an option for you, you can do it the following:
Save your two values into the fields "fixvalue" and "varvalue"
Save your expression into a field ("expression") using the string indicator ' (single quote) like this: '("fixvalue" * "varvalue")'
You can now calculate your result using the expression eval( "expression"). ...
I'm not familiar with Python in ArcGIS specifically, but, as @JGH noted in their comment, the variables in your function definition (ISLNumero and SubtipoIS) must correspond to the names you use in the function body (ISL_Numero and Subtipo_IS). If there's some kind of error log in ArcGIS, I would expect to see a NameError: name 'ISL_Numero' is not defined ...
The only solution I have found so far is to use the plugin Sort and Number. First get latitude and longitude for each point using Add Geometry Attributes then use the plugin. Input ycoord as 1st field and xcoord as 2nd field. This will had a column with the row number.
Usually, you can choose between two ways to format a field name in the Field Calculator:
If the field name has no spaces, you can use only the field name, like this: fieldname
If the field name has spaces or resembles a field calculator function, you must enclose the name in doublequotes, like this: "field name"
Your field, "left(dista" looks like the ...
You can make an SQL query from DB Manager to create a new "virtual" layer.
Turn on DB Manager standard plug-in from the menu (Plugins/Manage and Install Plugins...)
Load the necessary layers, tables for join.
Open DB Manager from the Database menu and look for your table among Virtual layers and Project layers.
Select the second icon in the toolbar (paper ...
The easiest way to get this is by going to the layer properties of the Transport - District layer and go to the "Attributes Form" tab, where you can click on the FROM_TRAFFIC_IMPACTOR_CODE field and select value relation as widget type, use TRAFFIC_IMPACTOR_CODE as layer, TRAFFIC_IMPACTOR_CODE as key and DESCRIPTION as value field. Repeat this for the ...