I am trying to get the Library which is located in different site from my list workflow. i am trying to do Query List to fetch using alternative site option but I am getting List not Found.
Your site URL is wrong. You only need the direct link to the site itself. Remove everything after 'dep2'.
Also, confirm that the List ID is correct for the list you're trying to pull.
Its failing as well if I try till DEP2 path.
Did you confirm that the List ID is correct? You should be able to get it from the URL in the List Settings page.
How should I confirm?
@chaddavis wrote:Did you confirm that the List ID is correct? You should be able to get it from the URL in the List Settings page.
On the list you want to query, go to the List Settings page.
Look at the URL. It should have something similiar to this at the end:
List=%7B3548B49E-11E6-4185-A43E-0771E6893073%7D
Now compare that to the List ID in your CAML Query.
%7B = {
%7D = }
So, in my example:
%7B3548B49E-11E6-4185-A43E-0771E6893073%7D
=
{3548B49E-11E6-4185-A43E-0771E6893073}
If they don't match, you need to replace the List ID in your CAML Query with the List ID from the URL. If you do, make sure you replace the %7B and %7D with the correct characters.
Oh, and when you use the Run Now option, you have to use real data. You can't just leave this line the way it is:
<FieldRef Name="{ItemProperty:Activity}"/>
You have to replace
{ItemProperty:Activity}
with real data to test.
Thanks a lot. It is working now. It has been a great help.
I would suggest opening a new question for this if you're not able to figure it out.
However, it sounds like you're trying to just type JavaScript into your formula, and you can't do that.
Use the Inline Functions. There's a substring function.
I used the Build a String action and this worked great:
Great!!! I have one more issue with this workflow. I got data from other site I need to query it and get the matched record from that list. can you tell me how can I do this. please find below screenshot.
When you query a list, each column's values need to be added to a collection variable. Make sure all of the variables in the second screenshot are collection variables.
Then, you'll need to use a For Each to loop through the collections because each collection variable will hold content across all of the records returned.
I need to fetch one record from the list which matches one of the list. I need to get one record from another site which matches DOCID of the current workflow. like in SQL select * from where DocID='*******'
In the query where you only need one result, you won't need collection variables. However, you will need a <where> clause in the CAML. There are a number of posts and articles online showing how to properly setup a CAML query with what you're looking for. Or, you could use the standard Query List action on something in the current site, then click CAML to convert the query and deconstruct/modify it to meet your needs for the other site.
I am trying to get the record but I am getting null even after running the workflow. please find below screen for more information.
Does it work in the Run Now screen when you use a real value?
If so, that Workflow Variable isn't being populated correctly.
If not, then something else is wrong. Unfortunately, I'm not going to have anymore time to help with this right now. You're going to want to do a lot more research on how to correctly use the Query List action, especially using CAML Query.
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.