Label in cascading field in template

Hi!
I have the question:

- I have 3 registered (A, B and C)

In register B, I have a dropdown field that takes the registers made in Register A.

In register C I have a cascading field with the records made in Register B.

My problem is that, in the PDF template it is printing the value (which is the correct one that is saved in the database), but I need the label (from Register A) to be printed in the PDF of list.

Would it be possible? If so, how would I do this process?

Thank you!
 
I think we're a little "lost in translation" (so, no blame on you!).

In your lines
- I have 3 registered (A, B and C)
In register B, I have a dropdown field that takes the registers made in Register A.
In register C I have a cascading field with the records made in Register B.
please replace any "registered", "register" and "registers" with the original terms:
- list
- form
- row (= record)

That's because in the English Joomla/Fabrik world, "register" only relates to Joomla user accounts.
 
sorry about the mess @lousyfool .

I'll try to explain it better.

- I have "Form A" with a text field.

- I have another "Form B" with a databasejoin field that linked the "Form A" records from its text field.

- I have another "form C" with a cascading dropdown field with the information recorded in "form B".

In form C, only the ID is being displayed (which is correct), however I need to display the Label that was registered in "form A".


In the cascading dropdown field (form C) I've already used:

(SELECT `field_A` FROM table_A WHERE `id` = {thistable}.name_field_A)

But I was not successful.

Could this action be done?

Thank you!
 
Now it's all "form"... and that can't be, it doesn't make sense either.
Maybe someone else here is better with mind-reading, but I can't get my head around this, sorry.

If you have trouble with translating into the original English terminology, perhaps switch your site language to English and take a look again... and eventually post screenshots in English or at least with clear explanations.

Sorry again.
 
I don't use Fabrik's built in pdf-options too much myself, but as a workaround you could add extra calc element where you get the label of the cascading dropdown element with a simple placeholder. And you could hide the original element in pdf output with css.
 
I assume your WHERE condition is not correct, see the examples in WIKI for CCD and dbjoin elements
If you wish to set a label from a data value that is not an available placeholder, you can use MySQL Concat to retrieve the value by embedding a subquery within the CONTACT Label field:

(SELECT `column_containing_desired_value` FROM other_table WHERE `id` = {thistable}.field_containing_foreign_key)
....
If the label of your dbjoin is a dbjoin value itself get it's label with
Code (SQL):
(SELECT name FROM table2 WHERE table2.id = {thistable}.element)
(SELECT `field_A` FROM table_A WHERE `id` = {thistable}.name_field_A)
{thistable} is your tableB, you need the tableB column (foreign_key)
WHERE id = {thistable}.tableB_column-pointing-to-tableA
 
OK @juuser and @troester !
I will run the tests according to the instructions.

@juuser I had to use a calc field with '{tablename_element_name}' but it didn't work. Was there another way? Remember that tables A and B are already joined

Thank you!
 
Try troesters suggestion, but with calc element you must make sure that "Only calc on save" is set to "Yes" and edit the records for the data to be recorded in database (or use update query e.g. in PhpMyAdmin if you have larger number of records).

And make sure you have 3 underscores in your placeholder after table name.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top