Cancel
Showing results for 
Search instead for 
Did you mean: 

Query to find item revisions where datasets las modified on different dates

Experimenter
Experimenter

Hi,

 

Is it possible to create a query that returns itemrevisions where 1 dataset has been modified today but another hasn't?

 

Scenario = ItemRev1 has Dataset1 and Dataset2.

Dataset2 is set to be auto created on save of dataset1 on all bar a few items.

 

End goal is to identify these items that aren't created automatically on save to be able to set dispatcher to run on a nightly basis to update dataset2 (DirectModel files).  Hoping to start this off with this query but any alternative suggestions welcome too?

 

Thanks.

4 REPLIES 4

Re: Query to find item revisions where datasets las modified on different dates

Phenom
Phenom

Not with queries in TC.  TC queries cant be used to compare values of properties between objects.  You could probably use queries and some logic in a workflow, but you would have to submit all revisions to the workflow for it to work!

 

We have a spreadsheet that uses a sql stored procedure which outputs text which I copy to a file.  I then run the line utitity disptacher_create_rqst:

 

Contents of Input.txt:
itemID1,revID,IMAN_specification,itemID1,

itemID2,revID,IMAN_specification,itemID2,

 

cmd line:

disptacher_create_rqst -f=Input.txt -dt=SWDrw -pr=1 -pn=SIEMENS -tn=swtodxf -ty=COMMAND_LINE -u= -p= -g=

Regards,

Richard

Richard Bennett
Prospect PLM

Re: Query to find item revisions where datasets las modified on different dates

Experimenter
Experimenter

Thanks Richard.

 

However, i'm not sure that's 100% what i want.

 

In your example below, you're refering to 2 seperate items (id1 and id2).  Not sure if this was deliberate or not, but my request needs to look at the same item.

 

If it's not possible to identify the differing dates on 2 datasets in the item, is it possible to create a query that might look at the last modified date on the dataset and the last modified date on the item rev?  Though not perfect, this would allow us to get the targets (though it may include a small subset of extras).

 

Thanks in advance.

Femi

Re: Query to find item revisions where datasets las modified on different dates

Phenom
Phenom

My example was just the load file for dispatcher.

 

We use a sql stored procedure called from a spreadsheet to generate the input file for dispatcher.  What im suggesting is that to find the datasets whose date is earlier than another then use SQL.  Unfortunately I didnt write this bit of code, nor the spreadsheet that calls it!  So, I'm saying its possible to acheive what you want but I dont know how to help you :-(

Richard Bennett
Prospect PLM

Re: Query to find item revisions where datasets las modified on different dates

Experimenter
Experimenter
Ah ok, thanks Richard. I misunderstood.

I don't have access to use SQL currently so I was trying to proceed without this.

I will see if there's any other options available.

Thanks,
Femi