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.
@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?
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.
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 😕
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.
For repeating section and query XML:
For real time check:
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.