Loading ...
Sorry, an error occurred while loading the content.

How to modifiy a clip to use a variable twice

Expand Messages
  • Stephen
    I m not sure I m doing this right, but I ll give it a try. I think what I want is mindlessly simple, I just don t know how to do it. I have a clip, which asks
    Message 1 of 2 , Jun 2, 2013
    • 0 Attachment
      I'm not sure I'm doing this right, but I 'll give it a try. I think what I want is mindlessly simple, I just don't know how to do it. I have a clip, which asks for some values, then creates a reference. Here is the clip:

      ^!SetWizardLabel "Enter values"
      ^!InsertWizardHtml <ref name="^?{&Object Ref Name=^&}">{{cite news|last=^?{&Object Last=^&}|first=^?{&Object First=^&}|title=^?{&Object Title=^&}|date=^?{&Object date=^&}|url=^?{&Object url=^&}|newspaper=New York Times|publisher=Arthur Ochs Sulzberger, Jr.|accessdate=^$GetDate(dd mmm yyyy)$}}</ref>

      Here is a sample results:

      <ref name="NYT final">{{cite news|last= LONGMAN|first=JERÉ|title=Lady Vols Win N.C.A.A. Championship |date=April 3, 2007|url=http://www.nytimes.com/2007/04/04/sports/ncaabasketball/04women.html|newspaper=New York Times|publisher=Arthur Ochs Sulzberger, Jr.|accessdate=02 Jun 2013}}</ref>

      What I really want to generate is the following:

      <ref name="NYT final"/>

      <ref name="NYT final">{{cite news|last= LONGMAN|first=JERÉ|title=Lady Vols Win N.C.A.A. Championship |date=April 3, 2007|url=http://www.nytimes.com/2007/04/04/sports/ncaabasketball/04women.html|newspaper=New York Times|publisher=Arthur Ochs Sulzberger, Jr.|accessdate=02 Jun 2013}}</ref>

      The only difference is that the first piece in angled brackets is repeated, and a backslah is added in the first one. I assume I need to know how to reuse an object variable, which I bet is easy, I just don't know how.
    • Don
      Once you set a variable, then you can use it thus ^%variable% To set it use set: Set %VARIABLE%=^?[Variable=_default|other]
      Message 2 of 2 , Jun 2, 2013
      • 0 Attachment
        Once you set a variable, then you can use it thus ^%variable%

        To set it use set:
        Set %VARIABLE%=^?[Variable=_default|other]

        On 6/2/2013 5:03 PM, Stephen wrote:
        > I'm not sure I'm doing this right, but I 'll give it a try. I think what I want is mindlessly simple, I just don't know how to do it. I have a clip, which asks for some values, then creates a reference. Here is the clip:
      Your message has been successfully submitted and would be delivered to recipients shortly.