bIT_sosswald
Returning Responder

Rule with FormDataValueService and dataset GID to access formfield of dataset

Hello everybody,

Requirement:

I try to do the following: In a link template where a dataset can be linked using FS_DATASET, I want to show the title field of the dataset as link text for DOM-Editors.

2024-04-11_09h20_56.png

Since this is not possible by default my approach is to:

  • Add an additional hidden text field
  • Create a rule which is using the FormDataValueService to access the title field of the dataset
  • Copy the value from the title field of the dataset to the hidden text field in the link template
  • Use the hidden text field as link text

Problem

This approach seems to work in general.

But in the documentation there is only a hardcoded gid access mentioned. See: https://docs.e-spirit.com/odfs/template-develo/rules/connecting-exte/determining-inf/index.html#gid_...

So with the following rule I can access the field from the hardcoded dataset.

	<RULE>
		<SCHEDULE delay="0" id="C" service="FormDataValueService">
			<PARAM name="GID">
				<TEXT>9c86b3e9-7207-4d12-a788-f53f82d37bb8</TEXT>
			</PARAM>
			<PARAM name="TEMPLATE">
				<TEXT>tt_download</TEXT>
			</PARAM>
			<PARAM name="FIELD">
				<TEXT>tt_title</TEXT>
			</PARAM>
			<PARAM name="LANGUAGE">
				<TEXT>DE</TEXT>
			</PARAM>
		</SCHEDULE>
		<DO>
			<PROPERTY name="VALUE" source="lt_foo"/>
		</DO>
	</RULE>

 

Question

How can I access not only a hardcoded dataset but the one which the editor selects in the FS_DATASET input component?

I want to have the title of the dataset to be copied to the text field in my link template.

2024-04-11_09h16_48.png

 

Any help is welcome

 

Sandro

0 Kudos
2 Replies
StefanS
Returning Observer

Hi Sandro,

I am not completely sure, if it will work. But instead of TEXT it is possible to use PROPERTY within PARAM. So you might be able to use the property GID for the Dataset-field as dynamic parameter.

Cheers,
Stefan

0 Kudos