Search the FirstSpirit Knowledge Base
Hello everyone,
I'm wondering how to get the value(s) of foreign key relations when querying a table row. Using the #row object, the results I get are in entity format:
de.espirit.or.impl.EntityImpl@7781c783{f_companies,PERSISTENT,released,fs_id=791,fs_valid_from=1321381679534,fs_valid_to=9223372036854775807,fs_release_to=9223372036854775807}
Using the .length() function as in $CMS_VALUE(#row.f_companiesList.length)$, I can also recover the number of relations found. What I'm missing is how to get textual value of such relations.
Thanks fro any help you can provide!
Peter
Hello Peter,
you can access any value of the company table using this syntax:
#row.f_companiesList.COLUMNNAME
If you have a 1:n oder m:n relationship you can access every single value with the following code
For example the company list: (with a column "Name" in the table "Companies")
$CMS_FOR(company, #row.f_companiesList)$
$CMS_VALUE(company.Name)$
$CMS_END_FOR$
Rouven
Hello Peter,
you can access any value of the company table using this syntax:
#row.f_companiesList.COLUMNNAME
If you have a 1:n oder m:n relationship you can access every single value with the following code
For example the company list: (with a column "Name" in the table "Companies")
$CMS_FOR(company, #row.f_companiesList)$
$CMS_VALUE(company.Name)$
$CMS_END_FOR$
Rouven
Hello Rouven,
Thank you!
It works as explained.
Peter