ldriver
I'm new here

Need help with <RULES>, copying name of one input to another

Jump to solution

Hi all, I have the following inside a Link Template:

<CMS_MODULE>


  <FS_REFERENCE name="lt_media" hFill="yes" useLanguages="no">

    <FILTER>

      <ALLOW type="file"/>

    </FILTER>

    <LANGINFOS>

      <LANGINFO lang="*" label="Form"/>

    </LANGINFOS>

    <PROJECTS>

      <LOCAL name=".">

        <SOURCES>

          <FOLDER name="files" store="mediastore"/>

        </SOURCES>

      </LOCAL>

    </PROJECTS>

  </FS_REFERENCE>

  <CMS_INPUT_TEXT name="lt_text" useLanguages="no">

    <LANGINFOS>

      <LANGINFO lang="*" label="Reference Text"/>

    </LANGINFOS>

  </CMS_INPUT_TEXT>

</CMS_MODULE>

I would like to set up a rule, so that when the user selects the file, the name of the file shows in the Reference Text input text.  Right now I'm having trouble making anything happen at all.  In the preview no matter what I put nothing fires.  Right now I have this:

<RULES>

  <ON_EVENT>

    <IF>

      <PROPERTY source="lt_media" name="FOCUS"/>

    </IF>

    <WITH>

      <PROPERTY source="lt_media" name="VALUE"/>

    </WITH>

    <DO>

      <PROPERTY source="lt_text" name="TEST"/>

    </DO>

  </ON_EVENT>

</RULES>

Right now I would like when the name of the file is in focus after selected, something shows up in the lt_text field (which is why I put TEST).  The documentation isn't really helping for what I want.  Can anyone give me some pointers?

0 Kudos
1 Solution

Accepted Solutions
StefanSchulz
I'm new here

Hi,

Unfortunately, the desired functionality is not possible at least for both SiteArchitect and ContentCreator. The value of the Reference input is not compatible to a plain text. And there is no property to query the textual name of the reference for further processing.

If you need the functionality for SiteArchitect only, you could make use of a Service (via Schedule instead of With) to derive the name from the reference object.

Best regards,

Stefan

View solution in original post

0 Kudos
2 Replies
StefanSchulz
I'm new here

Hi,

Unfortunately, the desired functionality is not possible at least for both SiteArchitect and ContentCreator. The value of the Reference input is not compatible to a plain text. And there is no property to query the textual name of the reference for further processing.

If you need the functionality for SiteArchitect only, you could make use of a Service (via Schedule instead of With) to derive the name from the reference object.

Best regards,

Stefan

0 Kudos

Well rats.  Ok thanks.

0 Kudos