- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
Any help is welcome
Sandro
- Labels:
-
dataset
-
formdata
-
ules
-
ValueService
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
check those two links, maybe you get some idea:
https://community.crownpeak.com/t5/Questions-Answers/Rules-Empty-fields/m-p/34169
https://community.crownpeak.com/t5/Questions-Answers/Rules-for-Checkbox/m-p/23845
All the best,
Aleksandar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone.
Any update on this? We have been trying to dynamically fill the GID on the ValueService without success.
all the best,
Hagen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
From the upcoming FirstSpirit version 2024.8, it will be possible to use the values of complex input components (e.g. FS_REFERENCE or FS_DATASET) within a value service.
You can therefore write your own value service that can implement the requirements described here.
However, the FormDataValueService and the MetaDataFormService will not yet be extended accordingly within the next FirstSpirit Version. Although this change is loosely planned, it is not yet on the road map. If you consider an extension of these two value services as relevant, then it would make sense to submit a corresponding change request. (submit idea)
Best regards
Holger

