Home › Forums › vLooup for SharePoint › _vLookupID not populating with Power Automate create item flow
Tagged: Power Automate, vlookup
- This topic has 4 replies, 3 voices, and was last updated 3 years ago by Jay Baldwin.
-
AuthorPosts
-
-
November 11, 2021 at 23:59 #35097
Hello Alexander – I’m hoping you can help me resolve an issue with a missing _vLookupID when a new item is created by Power Automate.
My scenario is work requests are submitted to list A. After requests are approved, Power Automate creates a new item in the work request management list B. List B uses vLookup for notes, contacts, etc. However, the _vLookupID field is not populated when the record is created this way. If a record in list B is created using the out of the box New button, _vLookupID field populates.
Is there a something that can be configured to populate the _vLookupID field? Thank you!
Jay
-
November 12, 2021 at 15:28 #35102
Power Automate doesn’t load the new form in the way that clicking the “New” button does. You’d need to configure Power Automate to populate the fields the same way you have the vLookup fields being populated. It has to be done in Power Automate if you are using that to create the item.
-
November 12, 2021 at 16:54 #35107
Hi,
In the DFFS form the vLookup column is populated with a string combining the current user id and the current date like this:_spPageContextInfo.userId+":"+new Date().valueOf()
You cannot get the same method in a FLOW, but you all you need is an value that is uniquie within the list so using an expression like this should work:
rand(1000000000,2000000000)
You are not 100% certain to get an unique value using this method, but it should be fairly certain. If the theoretical chance of getting the same value on two items bother you you can prepend the current item id from the item you are triggering the flow on – something like this:
concat(triggerBody()?['ID'],':',rand(1000000000,2000000000))
Alexander
-
November 12, 2021 at 16:58 #35109
SteveE – Thank you. Could you elaborate on how to configure Power Automate to populate the vLookupID field?
And just for clarification, Power Automate is creating the parent item. Any item in the child lists (notes, contacts, etc.) is created using the DFFS add new item button.
-
November 12, 2021 at 17:00 #35111
Alexander – our posts crossed. Thank you for your help!
-
-
AuthorPosts
- You must be logged in to reply to this topic.