Help With rule
Posted: Tue Sep 10, 2013 4:34 pm
Hello guys,
Question about rules
I have a cube with 3 dimensions called "validacion viajes",Origen, Destino, Transporte ( Avion,Auto, Bus)
the Origen and Destino are pretty much de same, with cities from my country( Santiago , valdivia, arica, iquique, etc...)
if you select Avion(plane), you cannot fly to the same origin and destiny, it doesnt make sense, so i create this cube with 0 and 1, putting a 1 to the valid travels depending on the transport.
now in my other cube (PPTO Viajes) i have the follow dimensions:
-. N° (1,2,3,4.......40)
-. Medidas PPTO Viajes( measure dimension with Pasajero(passenger), Fecha(date), Origen(origin), Destino(destiny), Duracion(duration), Costo Pasaje(ticket Cost), Descuento(discount) )
where Pasajero, Fecha, Origen, Destino are string elements with picklists.
Descuento is a string element too without picklist.
-. Ramos ( ramo1,ramo2, ramo3....)
-. Moneda (UF, CLP)
-. Version(version1,version2...)
-. Canal (canal1..canal2)
-. Gerencia(managements)( gerencia1..gerencia2)
-. Control de Gestion( gestion)
with the picklist the client select one of the managements, the date (Ago, Sep, Oct) , origin, destiny and transport, if the crossing is not correct discount should say ( Not valid ) , in the contrary (OK)
( discount is a string element) and get me the ticket cost.
forget about getting the ticket cost for know, the first thing i want to do is to make that cossing validation for the origin and destiny.
i writed this on PPTO Viajes.
['Sin Canal','Sin Ramo','Descuento']= S: if((DB('Validacion Viaje',!Origen,!Destino,'Avion')@='1')&(DB('PPTO Viajes',!Control de Gestion,!N°,!Version,'Sin Canal','Sin Ramo',!Moneda,!Gerencia,'Transporte')@='Avion'),'OK','No aplica');
where "Sin canal" is from Canal Dimension
"Sin Ramo" From Ramo Dimension
"Descuento" from Medidas PPTO Viajes (measure dimension)
Im getting an invalid string expresion near !origen, !destino,'Av
I dont really get what im doing wrong here, if you guy can help me I will be very grateful. Sorry for my bad english tho!, if you didnt understand what i asked i will write it again!.
Thanks.
Question about rules
I have a cube with 3 dimensions called "validacion viajes",Origen, Destino, Transporte ( Avion,Auto, Bus)
the Origen and Destino are pretty much de same, with cities from my country( Santiago , valdivia, arica, iquique, etc...)
if you select Avion(plane), you cannot fly to the same origin and destiny, it doesnt make sense, so i create this cube with 0 and 1, putting a 1 to the valid travels depending on the transport.
now in my other cube (PPTO Viajes) i have the follow dimensions:
-. N° (1,2,3,4.......40)
-. Medidas PPTO Viajes( measure dimension with Pasajero(passenger), Fecha(date), Origen(origin), Destino(destiny), Duracion(duration), Costo Pasaje(ticket Cost), Descuento(discount) )
where Pasajero, Fecha, Origen, Destino are string elements with picklists.
Descuento is a string element too without picklist.
-. Ramos ( ramo1,ramo2, ramo3....)
-. Moneda (UF, CLP)
-. Version(version1,version2...)
-. Canal (canal1..canal2)
-. Gerencia(managements)( gerencia1..gerencia2)
-. Control de Gestion( gestion)
with the picklist the client select one of the managements, the date (Ago, Sep, Oct) , origin, destiny and transport, if the crossing is not correct discount should say ( Not valid ) , in the contrary (OK)
( discount is a string element) and get me the ticket cost.
forget about getting the ticket cost for know, the first thing i want to do is to make that cossing validation for the origin and destiny.
i writed this on PPTO Viajes.
['Sin Canal','Sin Ramo','Descuento']= S: if((DB('Validacion Viaje',!Origen,!Destino,'Avion')@='1')&(DB('PPTO Viajes',!Control de Gestion,!N°,!Version,'Sin Canal','Sin Ramo',!Moneda,!Gerencia,'Transporte')@='Avion'),'OK','No aplica');
where "Sin canal" is from Canal Dimension
"Sin Ramo" From Ramo Dimension
"Descuento" from Medidas PPTO Viajes (measure dimension)
Im getting an invalid string expresion near !origen, !destino,'Av
I dont really get what im doing wrong here, if you guy can help me I will be very grateful. Sorry for my bad english tho!, if you didnt understand what i asked i will write it again!.
Thanks.