AnsweredAssumed Answered

GetContainerAttribute with variable field name

Question asked by ReidCamp on Jan 13, 2016
Latest reply on Jan 13, 2016 by macwombat


I am trying to extract the date that photos were taken in an old database. For most of the photos, the 'created' metadata is blank. However, the filename of the photos contains the date, so I was parsing it out from there.


The script works fine if I put the actual name of the container field, for example:

GetAsDate(Substitute(Middle(GetContainerAttribute (tbl_DWS::ImpPhotoUpstream ; "filename" ); 7;10); "-";"/"))

returns 120929 after some more rearranging (yymmdd)


However, the script is looping through many fields, so I would like it to be more dynamic. So I tried multiple ways of keeping the field name dynamic based on the active field.

GetAsDate(Substitute(Middle(GetContainerAttribute (GetFieldName(Evaluate(Get(ActiveFieldName))) ; "filename" ); 7;10); "-";"/"))

But this returns 00.

I also tried setting the active field name as a variable before running this script step, and as a new variable in the Let() function.


I'm not sure where it is breaking down because GetFieldName(Evaluate(Get(ActiveFieldName))) returns the correct full field name.


When attempting to get "all" container metadata when referencing the container as a variable, most of the data is missing:



Storage Type: Text

MD5: 1904E61D4AE509F1FE1AC62BCBF3CA26

File Size: ?

Internal Size: 25

External Size: 0

External Files: 0


Is this a FM bug?