cancel
Showing results for 
Search instead for 
Did you mean: 
bimi82
Nintex Newbie

Help: update a list when items have been booked via the repeated section

Hello All,

 

I am working a small project where users can request IT devices to loan out.
The form has got a repeated section of maximum 3 rows.

 

The repeated section has got few lookup dropdown fields looking to [Inventory] custom list.

The inventory list contains all the devices including: DeviceType, DeviceName, and DeviceQnty

 

Now, the problems / challanges start:

 

How should I design the workflow so when items are booked, then to be deducted from the balance on the inventory list ? At same time, when a new item is booked, also to be checked against the inventory insuring there is in stock ...

 

I am struggling to make a start and build the 'logic' behind all this.

 

Please advise.

Labels: (1)
0 Kudos
Reply
6 Replies
Automation Master
Automation Master

Re: Help: update a list when items have been booked via the repeated section

@bimi82 ...The only way to get repeating section information is to link Repeating Section with a MLT list column. Read that XML and manipulate according to your process.

 

The only problem I see in your process is there won't be any real time update on items available....what if multiple users are submitting the form simultaneously?

0 Kudos
Reply
bimi82
Nintex Newbie

Re: Help: update a list when items have been booked via the repeated section

Hello

 

yes, I already have added the repeated section and binded to multi-line-field where the xml is stored.

 

now I am struggling with the workflow to extract the information for each row and to deduct from the quantity in the inventory list etc.

 

as per your question; of whch I already thought about, it will be tricky. I guess, i will make the workflow check if there is enough quantity and reject it.

 

or maybe there is a javascript code that can check quantity as you press submit button!?

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: Help: update a list when items have been booked via the repeated section

Hi,

Extracting the information from the repeating section is called parsing.
There are numerous examples on the community on how this is done.
https://community.nintex.com/t5/forums/searchpage/tab/message?advanced=false&allow_punctuation=false...

0 Kudos
Reply
bimi82
Nintex Newbie

Re: Help: update a list when items have been booked via the repeated section

Hi

 

Yes, it is clear that I need to pharse the XML but the problem is!!! HOW?

I need someone to draw up a mock sample ... as with the XML I need the data to be stored as a collection, then Each Loop function to go through each row and extract the information.

Next step is then to use the data and update the relevant list.

All this is clear in theory but I am struggling in practise :/

 

PharseXML_1.jpgPharseXML_2.jpgPharseXML_3.jpgPharseXML_4.jpg

 

0 Kudos
Reply
bimi82
Nintex Newbie

Re: Help: update a list when items have been booked via the repeated section

Further Notes:

 

The project is to implement an [Inventory] where user's can request 1 or more (up to 3) devices to be loaned out for a specific time.  The workflow needs to identify the requested devices and update the inventory list... so that there is an indication how many are left / remaining.

 

The request needs to be approved by the IT staff, which is easy doable.
As a result, an email is sent to the user to collect the items (aka. show a list of the booked devices).

 

Above all this, the question is > how to ensure that the item is in stock if two people book it at same time?  Is there a 'check up' once [submit] button is clicked ? Well, no ... and i am not sure how I will be able to prevent such instances :/  as I am not a coder either.  

 

Anyway ...

0 Kudos
Reply
Automation Master
Automation Master

Re: Help: update a list when items have been booked via the repeated section

@bimi82 ....

 

For repeating section and query XML:

  1. Create a MLT list column and make sure it's plain text only
  2. Now on your form, connect the repeating section to the above MLT column
  3. In your workflow, use the above column as a source and get all the collections (seperately). You can use XPATH builder to select each controls
  4. You don't have to query again in a for loop. Just create collections in first query XML action
  5. Now take one collection and use it in For loop
  6. Create a number variable "num_Index" and use that to get Index in For loop
  7. Now using collection operation and index value, get individual values of other collections for the index the for loop is running currently for
  8. You can then use the individual values as per your needs

 

For real time check:

I don't think OOO it will be possible. You may have to use JavaScript (which doesn't work in responsive forms). 

 

If I'm in your place, I'll use the workflow to check if the item requested is there in the inventory or not. If not then I'll notify the users to check later or whatever is your process and if it's there then send it to IT Staff for approval. 

 

With workflow it will be more cleaner and since the workflow triggers when an item is created, I don't have to worry about multiple submissions around same time.

Reply