Skip to main content
Nintex Community Menu Bar

Nintex Forms Max ID with lookup formula

  • March 15, 2022
  • 5 replies
  • 267 views

jackjen

Hello All,

I have been trying to get last record from a sharepoint list in the Nintex Forms (the maximum id based on a column as filter). I have used :

lookup("List","ID",max(lookup("List","Item Child Count","0","ID",true)),"ColumnYouWantOnPreviousItem") based on this solution by Nintex

-The function requires a number type parameter

-The function requires a string type parameter. Do you have any solution for that or any workaround?

Thank a lot

hdo box

5 replies

MillaZ
Nintex Employee
Forum|alt.badge.img+23
  • Nintex Employee
  • March 17, 2022

@Cheyanneong Could you perhaps assist here?


Forum|alt.badge.img+1

Hi, this question is not relevant for Nintex Analytics, I believe this is a question for the Workflow Automation team. I would recommend you post this in their forum instead and someone will be able to assist you.


Forum|alt.badge.img+1

@SeeDee could you please take a look at this and see if you are able to assist, thanks.


Forum|alt.badge.img+3
  • Nintex Employee
  • April 14, 2022

@sid Hey Sid - can you please help here? thanks


Forum|alt.badge.img+3
  • Nintex Employee
  • April 14, 2022

Hi JackJen

 

I would like to understand your use case a bit better to attempt to give you a better solution.

 

Looking at the formula that you have created, the reason you are getting those error messages is because:

 

- the inner "lookup function" is expecting a number, so instead of "0", try using just 0

lookup("List","ID",max(lookup("List","Item Child Count","0","ID",true)), "ColumnYouWantOnPreviousItem")

- Similar to that the outer "lookup function" is expecting the inner lookup function to return data of type number, but a lookup function always returns a text value. So to make this work the value out from the inner lookup would need to be converted to number data type.

 

In the post you have mentioned a Nintex Solution, would you be able to point me to that as well?

 

Thanks