talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

image UDF question

T
toolhater
Thu, Sep 1, 2016 10:08 PM

Hi Chris,
I took a look at your function and there was one table I don't see in my schema (v 4.3). The media_bampfa isn't in the fcart tenant. I thought it might be something like media_fcart but it doesn't exist. Do you know if this is compatible with the fcart version?
-chris

Hi Chris, I took a look at your function and there was one table I don't see in my schema (v 4.3). The media_bampfa isn't in the fcart tenant. I thought it might be something like media_fcart but it doesn't exist. Do you know if this is compatible with the fcart version? -chris
CH
Chris Hoffman
Thu, Sep 1, 2016 10:16 PM

Hi Chris,

Ah yes, media_bampfa exists in our system because we had to customize the schema for this implementation to add a "page number" field.  Your function would exclude that relationship and the field that is brought in.  We did this because one collection object could have multiple media handling records related to it, and we used this custom field (page number) to select the first image associated.  Since you don’t have this field to work with, you might need to do something else to make sure you are selecting just one related Media Handling record.  If my memory is correct, I think that the Media Handling record that appears first in the CSpace user interface is the one with the most recent “updatedat” timestamp.  That complicates the SQL somewhat, but unless you know that your museum staff are only adding one image per collection object, you might need to do this.Let me know if this helps.

Thanks,
Chris

On Sep 1, 2016, at 3:08 PM, toolhater toolhater@yahoo.com wrote:

Hi Chris,

I took a look at your function and there was one table I don't see in my schema (v 4.3). The media_bampfa isn't in the fcart tenant. I thought it might be something like media_fcart but it doesn't exist. Do you know if this is compatible with the fcart version?

-chris

Hi Chris, Ah yes, media_bampfa exists in our system because we had to customize the schema for this implementation to add a "page number" field. Your function would exclude that relationship and the field that is brought in. We did this because one collection object could have multiple media handling records related to it, and we used this custom field (page number) to select the first image associated. Since you don’t have this field to work with, you might need to do something else to make sure you are selecting just one related Media Handling record. If my memory is correct, I think that the Media Handling record that appears first in the CSpace user interface is the one with the most recent “updatedat” timestamp. That complicates the SQL somewhat, but unless you know that your museum staff are only adding one image per collection object, you might need to do this.Let me know if this helps. Thanks, Chris > On Sep 1, 2016, at 3:08 PM, toolhater <toolhater@yahoo.com> wrote: > > Hi Chris, > > I took a look at your function and there was one table I don't see in my schema (v 4.3). The media_bampfa isn't in the fcart tenant. I thought it might be something like media_fcart but it doesn't exist. Do you know if this is compatible with the fcart version? > > -chris
T
Toolhater
Thu, Sep 1, 2016 10:18 PM

Thanks Chris.

-Chris

On Sep 1, 2016, at 3:16 PM, Chris Hoffman chris_h@berkeley.edu wrote:

Hi Chris,

Ah yes, media_bampfa exists in our system because we had to customize the schema for this implementation to add a "page number" field.  Your function would exclude that relationship and the field that is brought in.  We did this because one collection object could have multiple media handling records related to it, and we used this custom field (page number) to select the first image associated.  Since you don’t have this field to work with, you might need to do something else to make sure you are selecting just one related Media Handling record.  If my memory is correct, I think that the Media Handling record that appears first in the CSpace user interface is the one with the most recent “updatedat” timestamp.  That complicates the SQL somewhat, but unless you know that your museum staff are only adding one image per collection object, you might need to do this.Let me know if this helps.

Thanks,
Chris

On Sep 1, 2016, at 3:08 PM, toolhater toolhater@yahoo.com wrote:

Hi Chris,

I took a look at your function and there was one table I don't see in my schema (v 4.3). The media_bampfa isn't in the fcart tenant. I thought it might be something like media_fcart but it doesn't exist. Do you know if this is compatible with the fcart version?

-chris

Thanks Chris. -Chris > On Sep 1, 2016, at 3:16 PM, Chris Hoffman <chris_h@berkeley.edu> wrote: > > Hi Chris, > > Ah yes, media_bampfa exists in our system because we had to customize the schema for this implementation to add a "page number" field. Your function would exclude that relationship and the field that is brought in. We did this because one collection object could have multiple media handling records related to it, and we used this custom field (page number) to select the first image associated. Since you don’t have this field to work with, you might need to do something else to make sure you are selecting just one related Media Handling record. If my memory is correct, I think that the Media Handling record that appears first in the CSpace user interface is the one with the most recent “updatedat” timestamp. That complicates the SQL somewhat, but unless you know that your museum staff are only adding one image per collection object, you might need to do this.Let me know if this helps. > > Thanks, > Chris > > >> On Sep 1, 2016, at 3:08 PM, toolhater <toolhater@yahoo.com> wrote: >> >> Hi Chris, >> >> I took a look at your function and there was one table I don't see in my schema (v 4.3). The media_bampfa isn't in the fcart tenant. I thought it might be something like media_fcart but it doesn't exist. Do you know if this is compatible with the fcart version? >> >> -chris >