Get newly created Item ID after Copy Item Nintex - workflow

i have created a Nintex Workflow in Sp10 which after a few checks, duplicates the current item via COPY ITEM to the same list.
What i now need is to change 2 values of that newly created item(status and Ready) but i am unable to get the new id of the just created item.
there are too much columns to use the Create Item action nor is it the customers wish to copy the item to a hidden list and that another workflow edits the values before copying the Item to the original list.
is there any way to get the id for the duplicated item? I am not so familiar with Webservice.
regards
Pascal

I came across such scenario. As "COPY ITEM" workflow action do not return newly created Item "ID", I used below steps to resolve the problem:
Store the Values of "Current Item" in Workflow variables as required. (In your case status and Ready).
e.g. OldStatus = Status OldReady = Ready
Use "Update Item" workflow action and update the "Current Item" with your desired values required for newly created Item (In your case status and Ready).
Use "Copy Item" workflow action and copy the "Current Item" to desired Library/List.
At this step your newly created Item will have your desired values.
Here we basically revert the "OLD" values of current item. So, Use "Update Item" workflow action and update the "Current Item" with its original values.
i.e. Status = OldStatus
Ready = OldReady
I know this is not the best solution but it will work.. :)

Related

How can i view the Created Date and the Owner of the Field in Azure DevOps

I am working on Azure DevOps and I know little about the product. I want to view the field history when it is created and by whom it is created and last modified.
I have gone through a couple of things in docs but it didn't help me.
Research up till Now
It shows me the fields but no information other than when I clicked on fields it gives me an option to delete the field.
Path
Organization Setting > Process > Fields
How can i view the Created Date and the Owner of the Field in Azure DevOps
Indeed, there is no such out of box way to get the Created Date and the Owner of the Field.
As a workaround, we could add a custom field in our custom process and set the value to 1 when the field is defined with a value. For example, I create a MyCustomFiled field and add rule to set the MyCustomFiled to 1 if the target field is defined:
In this case, when the target field is created by some one, our custom filed will be set with value 1.
Next, we create a query with following Filters:
Now, we could get the Created Date and the Owner of the Field.
Update:
what about the fields that are already created?
For this situation, we could query workitems whose fields have been modified according to the opposite conditions, for example, the Description field:
If this workaround still not work for you, you could try to use REST API Revisions - Get to get all the history for one workitem, use scripts to filter the revision about the specify field, then loop through all the workitems.
GET https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{id}/revisions/{revisionNumber}?api-version=5.1
Hope this helps.

How to set conditions to avoid duplicate run for Tasks creation for a User Story

I created a Power Automate flow to create 9 tasks (Dev, Testing, and BA tasks) as a child for a new user story when it is assigned.
It works fine but it is getting duplicated every time when the story is assigned back from Unassigned to a resource.
I tried to get the count of related tasks for the user story before creating them but couldn't find any default conditions to get that.
Is there any other condition to set to avoid this duplicate task creations?
Solution for the query to set a condition to check for the existing workitems before creating them has been provided by yashag2255 on the Power Automate forums:
To get the work items related to the user story, you will have to send a HTTP request for that. But before sending this request -> Go to Azure DevOps -> Queries -> My Queries -> Create a new blank query and save it. (In this example let us say TestNew).
After you have done this, in the flow under the trigger create an action as shown. Very carefully populate all the fields. (here 'yashTest' is my project, replace it with yours)
Body : {
"name" : "TestNew",
"queryType" : "tree",
"wiql" : "SELECT [System.Id],[System.Title],[System.State] FROM workitemLinks WHERE([Source].[System.WorkItemType] = 'Task' AND [Source].[System.Id] = )AND ([System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward')AND ([Target].[System.WorkItemType] = 'Task')MODE (Recursive)"
}
in the "wiql" near the [System.Id] = select the ID of the work item retrived from the trigger action (the original trigger request that has the id of the assigned work item)
Now, create a new string variable to get the query ID and put the foloowing expression in the expression editor and add it to the string value.
body('Send_an_HTTP_request_to_Azure_DevOps')['id']
Now add another action: Get Query Results with the query ID in the previous step. This will fetch you a list of the work items related to the assigned work item. You can iterate thorough this to check if the items exist and if not create them with Create Work Item Action.
Source: https://powerusers.microsoft.com/t5/Building-Flows/How-to-set-conditions-to-avoid-duplicate-Tasks-creation-for-a/td-p/289629

How to automatically populate Custom Item Field with data from a saved report in NetSuite?

Software Platform - NetSuite
Goal - Run a weekly sales report. Use the data from that report to populate a custom item field on the item record (Kit item) in NetSuite.
Can this be done using a workflow or???
Before you try to write a Script or create a Workflow, I recommend you investigate NetSuite's ability to populate Custom Fields with Search Results.
Check out the Help page titled Creating Custom Fields with Values Derived from Summary Search Results for the details.
The basic process will involve creating a Saved Search that generates the data you need, then using the Validation and Defaulting tab on your Custom Item field to select the Search you created.
This should be done using SuiteScript. In your script, run a search, store the data as JSON, and submit the data to the item record. You could submit the data into a single text field on the item record, but it would be better to create a Custom Record Type "Sales Report" which has a list/record field sourced from the item and with the "Record Is Parent" checkbox checked. This will display your custom record on the item in a sublist. Using a Custom Record Type will allow you to store the data over multiple iterations. If you use a field on the item record it will be replaced each time you run the script.

NetSuite Workflow

I need help on how to create the following workflow please. I added a new body field in the NetSuite sand box called “sow.” It is a check box field and I added it to the sales order transaction page. Is it possible to make a formula that says: If “contract type” field that exists on opportunity equals “sow”, check box, if not don’t check box? So the field contract type is on the opportunity and once this is contract type is set to SOW the checkbox SOW on the opportunity should be checked.
Your workflow will need a single State. The State will have a single Set Field Value Action, which will mark the checkbox accordingly. This Action will have a Condition that looks at the value of the Contract Type field.
New Workflow
Name the Workflow
Give it an ID
Record Type: Transaction
Sub Types: Sales Order
Trigger Ttype: Before Record Load
WorkFlow Condition: Condition
Field: SOW -- Compare Type: checked
Workflow Condition

Amazon Dynamo DB - Scan & Update table records - iOS SDK

Is there an option to scan & update a record in a DynamoDB table using a single API. Consider I have list of items in a Items table, with the fields (ItemID, ItemName, ItemAssigned). ItemID is the Hash key of the table. Items IDs are named like , Item1, Item2, Item3 etc., The users will not know what are the items are in the table. So, in the app, if a user taps "Get an item" button, then a random item will be fetched and assigned to him. Then ItemAssigned is set to YES. The Items tabe Then the item will not be assigned to any other user. This is what happens.
Steps:
1. Taps "Get an item"
2. Scan the first item from the Items table, where ItemAssigned = NO
3. Show the item in the home screen
4. Update the item in the Items table to set ItemAssigned = YES
This works good, if one user is trying to get the item at a time. The problem occurs when two users A & B are trying to get an item at the same time, and the same item is assigned to both the users.
So first A fetches the item. Before the Items table is updated to set ItemAssigned = YES, B also fetches the same item. Now both A & B's home screens show the same item. This is wrong.
The only way is to Scan & Update the Items table using a single API. Is there any possibility to do this in Amazon DynamoDB?
Thanks.
Unfortunately there is no API that scans and updates in a single operation. You may want to look into conditional PUT item as this will allow you to implement a checkout like feature such that you can set "ItemAssigned = YES" only if "ItemAssigned = NO".
Your application code will need to handle the exception gracefully when dealing with a scan result, but will allow for the workflow you're requesting of only allowing one user to see the item.
API docs for PUT item