Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Set data type in Rules (Read 2250 times)
Talal
Full Member
*
Offline



Posts: 56

Set data type in Rules
Dec 9th, 2013, 5:33pm
 
Hello. I am trying to create a Rule for a prototype, in which the Rule for all notes created from this prototype will contain: $Name=$Authors+" "+$PublicationYear+" "+Pages. What I want is for the name of the resulting notes to show (for ex.): "Duxbury 2009 34-45". However, what I am getting instead is "Duxbury;2009;34-45".

I know that this has something to do with the face that the "Authors" attribute (found in Attribute Group "References") is a "Set" Attribute Data Type. As such, when I replace "Authors" with "Author2" which is a String Attribute Data Type, it appears as desired.

Does anybody know what I need to do, or to add, to my Rule in order for a Set Data Type to appear correctly without the semicolons? Many thanks in advance.
Back to top
 
« Last Edit: Dec 09th, 2013, 5:33pm by Talal »  
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Set data type in Rules
Reply #1 - Dec 9th, 2013, 7:19pm
 
Coerce $Authors to a string

    $MyString=$Authors

Now your rule will work

   $Name=$MyString+" "+$PublicationYear

The meaning of "+" is different from sets, strings, and numbers.
Back to top
 
 
WWW   IP Logged
Talal
Full Member
*
Offline



Posts: 56

Re: Set data type in Rules
Reply #2 - Dec 9th, 2013, 8:07pm
 
Indeed. Many thanks for the quick rescue!
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print