Query List Action assigns zero the variable or resets the variable.


Badge +2

Hi,

I have got Nintex Workflow which runs query on the list and stores resulting value in a variable declared on whole Workflow. 

next step I set this value as field value using Nintex action.

Problem: the field value is always set to zero (0) despite the fact that when I ran the query in Nintex Workflow (Query List Action), it was returning actual numbers but some how when it goes outside the Query List Action the variable value is reset to Zero (0).

any idea why is this happening?

many thanks

Aqib


8 replies

Badge +2

Follwoing is the query action.

215083_pastedImage_1.png

outside this action numSequence variable gets 0 value but when i run this query using Run Now button, it gives the correct result .

any help will be highly appreciated.

Userlevel 5
Badge +14

make sure the variable you filter by is populated with a value that you expect.

what are datatypes of numSequebce wf varible and list field that you query into the variable?

Badge +2

as you can see Sequence Number (In Sort Order) is SharePoint field and it's of type Number. I'm expecting only one INT value as result and I want to assign it to Nintex variable numSequence (data type Number)

Badge +2

as you can see below, the query is giving me correct answer. but it never gets assigned to numSequence variable which always returns zero.

215099_pastedImage_1.png

Badge +2

any Help Please... happy.png

Userlevel 5
Badge +14

as you can see Sequence Number (In Sort Order) is SharePoint field and it's of type Number

I couldn't guess from sort by field that you return the same field and what it's datatype... happy.png

as you can see below, the query is giving me correct answer

in Run now you typed in the value to filter by on your own.

in runtime you (I guess) use a variable. therefore I suggested to make sure the variable really contains a value you want to filter by. write the variable to history log and check its content.

make as well sure it doesn't contain leading or trailing spaces.

Badge +2

Thanks Marian, you are the start and Nintex is crap. I had to clean the string variable in Filter field. removed 123;# and it worked as it should have.

Userlevel 5
Badge +14

great!

please mark the question answered.

Reply