[EP-tech] Re: Using a user metafield to control eprint workflow

John Salter J.Salter at leeds.ac.uk
Wed Oct 3 16:30:30 BST 2012


So, I've got  bit further with this, but still not quite there...
In the workflow, I can get the *rendered* values into a select box using the following:
  <component><field ref="collection" options="{$current_user{collection}}"/></component>
-or-
  <component><field ref="collection" options="{$item{userid}.as_item(){collection}}"/></component>
(first one gets current user's collections, second one gets user-that-owns-the-eprint's collections)
Which results in:
<option value="">UNSPECIFIED</option>
<option value="Collection 1">["collections_typename_Collection 1" not defined]</option>
<option value="Collection 3">["collections_typename_Collection 3" not defined]</option>
 - the value should be e.g. "collection1", not "Collection 1".

Is there a trick with EPScript to get the value of the namedset, rather than the rendered-value?

Cheers,
John

-----Original Message-----
From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of John Salter
Sent: 02 October 2012 16:02
To: 'eprints-tech at ecs.soton.ac.uk'
Subject: [EP-tech] Using a user metafield to control eprint workflow

In our archive, we have a namedset for 'collections':
collection1
collection2
collection3
...

This is used in an eprint to show which primary collection an item belongs to.
I also want to use the same namedset in the user configuration to control which collections someone can deposit into:
E.g. User has 'collection1' and 'collection3' selected in their profile, the first stage of the eprint workflow would be:
Which collection?
[] Collection 1
[] Collection 3

If a user only has access to one collection, this stage is skipped (as the field is set in the eprint_defaults.pl file).

What is the best way to control the options available in the workflow based on the depositing user?
It's similar to the 'user_review_scope.pl' - but at the depositing end of the process...

I'm probably overlooking something very simple!

Cheers,
john

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/



More information about the Eprints-tech mailing list