Cómo interactuar con los campos de texto

Muy buen día.
pidiendo ayuda otra vez
la idea que tengo es cuando seleccione donde dice salida el campo cantidad tenga signo negativo automáticamente y cuando sea entrada lo que ponga en cantidad quede positivo …

Gracias

Solved Solved
0 5 428
1 ACCEPTED SOLUTION

Hi @OMAR_DANIEL_PRIETO_V

You need to add a virtual column:

And set this:

Here is the correct expression:

IF(
	[_THISROW].[MOVIMIENTO]="Salida",
  -1*[CANTIDAD],
  [CANTIDAD]
)

View solution in original post

5 REPLIES 5

Aurelien
Google Developer Expert
Google Developer Expert

Hi @OMAR_DANIEL_PRIETO_V

You may want to use a virtual column in order to make -1 if negative value.
That will be your computed value.
Then, you can use this computed value in your calculations (quantity in or out ==> total stock with the minus and plus).

For reference:

Gracias por responder.

no me da asi, porque necesito es validar que opción selecciono primero el usuario si el botón “Salida” o la opción “Entrada” para saber que signo va a tomar el campo “cantidad”

algo asi
[_THIS]=“Salida”,[CANTIDAD]*-1 , que si selecciono “Salida” coja lo que esta en cantidad y lo pone negativo … pero esta instrucción me da error

Hi @OMAR_DANIEL_PRIETO_V

You need to add a virtual column:

And set this:

Here is the correct expression:

IF(
	[_THISROW].[MOVIMIENTO]="Salida",
  -1*[CANTIDAD],
  [CANTIDAD]
)

amigo muchas gracias si funcionó

Top Labels in this Space