gvSIG bugs #3062
Poder usar los corchetes en expresiones de cadena en la calculadora de campos.
Status: | Closed | % Done: | 0% | |
---|---|---|---|---|
Priority: | Low | Spent time: | - | |
Assignee: | Joaquín del Cerro Murciano | |||
Category: | Document table | |||
Target version: | 2.1.0-2263 | |||
Severity: | Minor | Add-on version: | ||
gvSIG version: | 2.1.0 | Add-on build: | ||
gvSIG build: | 2260 | Add-on resolve version: | ||
Operative System: | Add-on resolve build: | |||
Keywords: | Proyecto: | |||
Has patch: | Yes | Hito: | ||
Add-on name: | Unknown |
Description
Corregir el evaluador de expresiones de la calculadora de campos para que reemplace la evaluacion de los campos de forma mas inteligente y permita usar los corchetes en las expresiones cuando no se estan usando para referenciar un campo.
Por ejemplo, la expresion:
[CAMPO1][:10]
Deberia ser valida y devolver los primeros 10 caracteres del campo "CAMPO1".
Related issues
Associated revisions
refs #3062, Corregido el evaluador de expresiones de la calculadora de campos para que reemplace la evaluacion de los campos de forma mas inteligente y permita usar los corchetes en las expresiones cuando no se estan usando para referenciar un campo.
History
#1 Updated by Joaquín del Cerro Murciano over 9 years ago
- Description updated (diff)
#2 Updated by Joaquín del Cerro Murciano over 9 years ago
- Priority changed from Normal to Low
- Status changed from New to Fixed
#3 Updated by Álvaro Anguix over 9 years ago
- gvSIG build set to 2260
- Target version deleted (
2.1.0-2260) - Status changed from Fixed to New
- Category set to Document table
- File gvSIG.log added
No funciona.
Adjunto log.
#4 Updated by Antonio Falciano over 9 years ago
#5 Updated by Antonio Falciano over 9 years ago
A little correction. It should be:
subString([CAMPO1],0,10)because "The substring begins at the specified parameter2 and extends to the character at index parameter3 - 1."
#6 Updated by Antonio Falciano over 9 years ago
- File expression.patch added
In order to solve this, firstly I'd restore the old behaviour of square brackets (expression.patch).
Then, in order to allow slicing, I'd add two new functions in addiction to SubString: left and right. For instance, in Jython:
def left(string, value): return string[:value] def right(string, value): return string[-value:]
#7 Updated by Álvaro Anguix over 9 years ago
- Has patch set to Yes
#8 Updated by Álvaro Anguix over 9 years ago
- Related to gvSIG bugs #3102: Invalid syntax in Field Calculator added
#9 Updated by Antonio Falciano over 9 years ago
An extended use of square brackets would be very useful also in the case of regular expressions (see #2279). However, there's the Advanced tab of Field calculator in order to define and add new functions in the expressions.
#10 Updated by Álvaro Anguix over 9 years ago
- Related to gvSIG feature requests #2279: Add regex function(s) in the string functions of Field Calculator added
#11 Updated by Joaquín del Cerro Murciano over 9 years ago
- Target version set to 2.1.0-2263
- Status changed from New to Fixed
#12 Updated by Álvaro Anguix over 9 years ago
- Status changed from Fixed to Closed