Skip to main content
Nintex Community Menu Bar

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

  • April 30, 2018
  • 8 replies
  • 22 views

Forum|alt.badge.img+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

Forum|alt.badge.img+2
  • Author
  • April 30, 2018

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.


Forum|alt.badge.img+14
  • Scholar
  • April 30, 2018

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?


Forum|alt.badge.img+2
  • Author
  • April 30, 2018

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)


Forum|alt.badge.img+2
  • Author
  • April 30, 2018

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


Forum|alt.badge.img+2
  • Author
  • April 30, 2018

any Help Please... happy.png


Forum|alt.badge.img+14
  • Scholar
  • April 30, 2018

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.


Forum|alt.badge.img+2
  • Author
  • May 1, 2018

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.


Forum|alt.badge.img+14
  • Scholar
  • May 1, 2018

great!

please mark the question answered.