Dear FS Community,
I have a combo box as defined below and it fetches the data source values for labels.
<CMS_INPUT_COMBOBOX name="st_name" hFill="yes" singleLine="no" useLanguages="no">
<LANGINFO lang="*" label="Name"/>
Is there a way to copy the datasource value (st_name.value.fieldname) to an Input textbox in the same form with rules with First Spirit 5.2 May 2020 version? if so please help me with the solution.
Thanks and Best Regards,
In this example a date filed is taken, some days are added and the result is stored into another field. - I guess this could also work with the value of a combobox and a text field. When the combobox is filled by a datasource you must step in a little bit deeper to get the actual field of that datasource you want to use because the combobox itself stores the whole dataset.
Thanks for answering the question. I tried several ways but nothing helped me. Or the other way, is it possible to store st_name.value.fieldname in st_name instead of datasource identifier?
Seems <ADD> property is only helpful in case of integers and time units.
Hi Sathya and Sandro,
I don't think you can do this for a combobox with type database because you can't read properties/fields of the selected entity.
In addition you can't use them in ValueServices. The question is what you want to achieve by passing the label to a textfield.
Use another rule on it to verify the label is not empty or matches another condition?
In my opinion in that case a FS_BUTTON would be your best option.
I want to feed the value from the data source to another utility with the label st_name. Currently,I get the unique ID out of it.
Could you please help me how I can use FS Button to achieve it?
that's pretty simple. Just add a FS_BUTTON component and as parameters pass the two fields (the comboxbox and the textfield for the name). Sth. like that (please choose better name - just used them to make it easier to understand):
Then createn Executable or for testing purposes a FirstSpirit Beanshell Script and assign it to the FS_BUTTON (FirstSpirit Online Documentation - FS_BUTTON )
The parameters are ApiRemoteFormField Objects that provide the same methods as FormField FirstSpirit Access-API
so the script would just have to get the value from st_combobox, get the name out of it and write it to st_namefield. Sth. like this (please add errorhandling and so on).
Haven't tested the script.