Get next code in the data base

0
context: in a microflow I retrieve an element based on the status in an enumeration and his association to the queue entity, as a result I get one object of the entity access code that has the status “attending”, now as a next action in that microflow I need the object that comes next to this one based not on the status but on the code attribute of the same entity. how can I do this?    
asked
2 answers
0

Hi Constanza,

 

I hope I get your question right. Given an object “Access_code” you retrieved, you need the next “Access_code/code”? If so, you can retrieve a full list of “Access_code” from your database. You can sort this list descending. Create a list of “Access_code” with the XPath constraint that is is > than the object found. Subtract the lists and the object found, and the top of the list is your next “Access_code/code”.

 

If you meant it differently, please clarify.

 

Go make it

answered
0

Hi,

Does your Access_Code Entity has a unique valued Attribute which is Constructed in increasing order such as for example:

Entity : Access code

Attribute: Code : 

Values:  AC_212 and then next is AC_213 

If this is your Scenario upon my Understanding, you can use a find last and substring string operation to find the last key value (‘_’), so that you will have the integer value, convert the string to Integer using parse integer and increment the Value and then again reconstruct the code value and make use of that string with the attribute.

answered