Here is the Task...
The EPC’s(PDF's) themselves are not stored in the database, this is
because each client can have hundreds of EPCs and we don’t want these to
increase the size of the database, instead we save the EPC’s on the
server and link to them in the database.
To get the path of the EPC you need to get the path out of the database.
This can be done using the following SQL.
From DBA.enr_rds_xml_datas A
Join DBA.GlobalIniFile B on B.section = 'Paths' and B.ident = 'EPCStore'
Where A.location_id = MyLoCode
And A.is_current = 1;
You might want to look at creating a view for the above SQL and then
creating a Model for it so that you can access the data in Ruby easily.
You will need to create a new page for this as there is no existing one
currently. The EPC that is opened will depend on the location that the
user is currently on. The is_current flag in enr_rds_xml_datas will
ensure that only one EPC is returned for the current location.