Search the FirstSpirit Knowledge Base
Hi Community,
is it possible to set a FS_DATASET's value via ValueService?
It's working with string, and similar, but I can not find the way to set a dataset, or similar .
best regards,
zava
Hi Antonio,
just a quick guess, maybe this could help you:
Use a DatasetContainer instead of an Entity as the return value http://www.e-spirit.com/odfs51/Template-development/Template-syntax/Data-types/DatasetContainer/
Best Regards
Ralph
It depends what you want to do in rules.
Ex:
<RULES>
<ON_EVENT>
<IF>
<PROPERTY source="st_dish" name="FOCUS"/>
</IF>
<WITH>
<PROPERTY source="st_supplier" name="VALUE"/>
</WITH>
<DO>
<PROPERTY source="st_dish" name="query.supplier_id"/>
</DO>
</ON_EVENT>
</RULES>
This code from Rules/Value determination fromFS help documentation.
When particular combo box gets focus, its value is set in to another combobox query id.
So if you use value service, you can set the return value to select the combobox or feed the combo box selection to the value service to do something in the server end.
Hi Vijay,
I'm using a FS_DATASET...
this is my situation...
Rules
<ON_EVENT>
<SCHEDULE service="EntityCreator" id="ec" delay="500">
<PARAM name="language">
<PROPERTY source="#global" name="LANG" />
</PARAM>
</SCHEDULE>
<DO>
<PROPERTY source="csContactPerson" name="VALUE"/>
</DO>
</ON_EVENT>
Form Element
<FS_DATASET
name="csContactPerson"
allowDelete="no"
allowEdit="no"
allowNew="no"
hFill="yes"
hidden="no"
mode="combobox"
useLanguages="no">
<LANGINFOS>
<LANGINFO
lang="*"
label="Zur Kontaktaufnahme wenden Sie sich bitte an"
description=""
expression="#item.cn + " "+ #item.sn "/>
</LANGINFOS>
<SOURCES>
<CONTENT name="ds_ext_contact_persons"/>
</SOURCES>
</FS_DATASET>
and I have a ValueService "EntityCreator" send back a entity.
Hi Antonio,
where do you expect the Valueservice to work: JavaClient, WebClient or both?
As far as I know, the ValueService in WebEdit isn't able to handle complex datatypes - such as entity.
Best Regards
Ralph
You can send multiple parameters input to the service and can update the entity which belongs to the passing input dataset.
Eg:
<ON_EVENT>
<SCHEDULE service="EntityCreator" id="ec" delay="500">
<PARAM name="language">
<PROPERTY source="#global" name="LANG" />
<PROPERTY source="csContactPerson" name="VALUE"/>
</PARAM>
</SCHEDULE>
<DO>
<PROPERTY source="csContactPerson2" name="query.lang_id"/>
</DO>
</ON_EVENT>
It is all about how you collect varibale from combobox which bound to dataset and pass it to value service.
It is possible!
Hi Ralph,
I'm trying actually only on JavaClient.
Hi Antonio,
just a quick guess, maybe this could help you:
Use a DatasetContainer instead of an Entity as the return value http://www.e-spirit.com/odfs51/Template-development/Template-syntax/Data-types/DatasetContainer/
Best Regards
Ralph
Grande Ralph