cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to query for site content type

Jump to solution

I have created document site content type and that i used for various doc libraries.

Now I want to query and get some item info from site content type fields. but if i user query list / query XML action that not allowing /showing me my site content type so that i am not able to query 

Kindly help me in this situation how should i get item from site content type 

Labels: (2)
0 Kudos
Reply
5 Replies
Automation Master
Automation Master

Re: how to query for site content type

Jump to solution

Hi yogesh deshmukh

You can add call Web Service action in your workflow and use Webs.asmx web service http://<server>/<site>/_vti_bin/Webs.asmx 

This provides a function called as GetContentType and GetContentTypes. See which one suits your needs.

The account that you use for credentials should have full control on the web site. Hope it helps.

Reply
Not applicable

Re: how to query for site content type

Jump to solution

Thanks Mr. Kapil thanks for your support/solution, but following is my requirement

Site Content Type :ABC

Columns are

DocID

DocOwner

DocType

 

Following Document list that uses ABC Content type

Science

DocID

DocOwner

DocType

ABC-X-0001

Yogesh

X

ABC-Y-0001

Mahesh

Y

ABC-X-0002

Rahul

X

 

Arts

DocID

DocOwner

DocType

ABC-X-0003

KAvita

X

ABC-Y-0002

Rajest

Y

ABC-X-0004

Vishu

X

 

Now if I add document in any one above list with DocType X then I want to update DocID is ABC-X-0005

So I thought I will add workflow on direct ABC Content type and query for this content type and get data and according to max value of DocID,  I will generate new values and update it in DocID column of content type.

 in this process i am using Site collection reusable workflow because in future if new sub site is created then this functionality automatically implemented 

But first thing first, I am tried with getcontenttype from _vti_bin/Webs.asmx but  I am not getting actual values from that just getting column names

Kindly help me in this scenario if possible then call +91 7588177352

Reply
Automation Master
Automation Master

Re: how to query for site content type

Jump to solution

I don't think you will be able to get the actual values unless you query the respective list or library. Someone should be able to pitch in with their opinions.

*I unmarked correct answer so others can still see this as open question. I'm just another community member, not support.

Reply
Automation Master
Automation Master

Re: how to query for site content type

Jump to solution

1. that's AFAIK not possible.

they're exactly named 'workflow reusable templates'. when you bind a reusable template to a content type, you then can but need not to use it on a list/library where the content type is used (you have to explicitly add content type's workflow to a list/library).

so with every content type usage separate 'workflow definition instance' is created. you are just assured that once you change template, the change is applied to all the instances.

there is definitely no reusable workflow template instance that would run across all the sites/collections.

that could be achieved with 'regular' site/site collection workflow (so no reusable template) that would visit all the subordinated lists, BUT....

2. I would never implemented a numbering resp. unique-like identifiers across lists!

apart from internal ID field (or customized scripting/programming), there is no (reliable) way within sharepoint/nintex how you could generate unique identifiers even within single list.

3. it's big performance deal to find a max value within single list, not to say among lists

and it will definitely not be reliable to be used as unique identifiers.

4. Webs.asmx's GetContentType  returns content type definition, not values within a given list item

Reply
Automation Master
Automation Master

Re: how to query for site content type

Jump to solution

Hi

Did Marian's reply help? If so, please mark it as correct for others who may be looking for similar help.

View solution in original post

0 Kudos
Reply