Skip to main content

Was wondering if anyone had a collection of example formulas they've used in past forms for formatting or validation. Would be great to have this published somewhere if it isn't already.

 

In particular, I'm trying to get an "or" formula working where it evaluates the value of a control for several different values. I tried:

 

ControlName != "Value1" || "Value2" || "Value2"

ControlName != "Value1" || ControlName != "Value2" || ControlName != "Value2"

Using an Array of data

 

!(inArray(ControlName, "Value") || inArray(ControlName, "Value"))

 

http://www.sharepointpub.com/nintex-forms-using-the-runtime-inarray-on-multi-select/


Thanks for the quick response Dan. Although the example you gave wasn't exactly what I needed, it did give the the syntax for what I was trying to accomplish. And the array example I'll most definitely use in the future as well. Here was my final formula. I was using a choice control (ReasonForLeave) and looking for any values with the text string "Sick" in it.

!(contains(ReasonforLeave,"Sick"))

Still would be great to have a single portal page for a bunch of example formulas. Maybe there's a support KB I'm not aware of?


I agree, it would be wonderful to have a page with example formulas. I'm getting frustrated attempting to build them and having no clue where I'm going wrong.


Thanks, Dan. I have a similar question as with Steven. We've tried your solution as well but it doesn't work for lookup values.

What we're trying to do is show/hide a section depending on the selected lookup value. The formula works when there's only one value, but no longer works with OR condition. We've attempted every iteration of the formula:

1. or(ControlName!='16;#Syndicated Loans',ControlName!='11;#Loans & Credit Facilities')   - only the first value works
2. ControlName!='11;#Loans & Credit Facilities' || !='16;#Syndicated Loans'   - doesn't work
3. ControlName!='11;#Loans & Credit Facilities' || ControlName!='16;#Syndicated Loans'   - doesn't works

So when does OR work if it does at all, and what is the syntax for it?

The only solution we can think of right now would be to add one rule at a time, which would mean adding several more hidden sections in the form.


Hola, tengo el mismo problema, no he logrado combinar la formula correcta:

Causas!='Ausencias injustificada' && Sancion!='Amonestación Escrita' --no funciona

!contiene(Causas,'Ausencias injustificada')  && !contiene(Sancion,'Amonestación Escrita') --no funciona

o((Causas!='35;#Ausencias injustificada') && (Sancion!='10;#Amonestación Escrita')) --no funciona solo la primera condición

Causas!='35;#Ausencias injustificada' && Sancion!='10;#Amonestación Escrita' --no funciona solo la primera condición

((Causas!='35;#Ausencias injustificada') && (Sancion!='10;#Amonestación Escrita')) --no funciona solo la primera condición

solo funciona con la primera condición y debo comparar ambas, algo no me esta saliendo bien. Aquí cuando escoja Ausencias injustificada en el campo de causas y luego escoja Amonestación Escrita del campo Sancion se debe mostrar el campo de text donde se debe poner información de lo contrario si no se cumple no se debe mostrar.

debe de quedar así: 

debe quedar así

pero si cambias la selección sigue apareciendo el campo.


Alguien tiene alguna idea?

Gracias happy.png


Prueba con las funciones:

Generador de fórmulas

y(no(contiene(Causas,'35;#Ausencias injustificada')),no(contiene(Sancion,'10;#Amonestación Escrita')))

Reply