You are viewing limited content. For full access, please sign in.

Question

Question

Dynamic Fields in templates - is this possible?

asked on October 31, 2017

Hello,

I am fairly new to Dynamic Fields in templates so please bear with me... I am wondering if it's possible to do the following with Dynamic Fields. I have three fields:

1) Field Name: Building Name

External Table: Buildings

External Column: Building_Name

 

2) Field Name: Building Number

External Table: Buildings

External Column: Building_Number

Parent Fields: Building Name

(these first two work fine so when I select the Building Name drop down, the Building Number populates)

 

3) Field Name: Teacher

External Table: Teachers

External Column: Teacher_Name

Parent Fields: Building Number

I would like to be able to have the Teacher drop down populated based on the Building Name selection (which then populates Building Number). Is this possible?

 

When I try to save the setup above, with that third field, I get the error "A dynamic field definition that uses simple binding can only reference a parent field that also uses simple binding. The parent field must be present in the same external table but use a different column from that table [9370]"

 

Note, the second External Table "Teachers" has a Building_Number column that corresponds to the Building_Number value from the Buildings External Table.

 

Thanks,

Julie

0 0

Answer

SELECTED ANSWER
replied on October 31, 2017

The Dynamic Fields do simple querying (no table joins) so all the data must come from the same table.  When you need to retrieve data from multiple tables, to get the data linked together, the query must join the tables on identifying fields.  Since the simple lookup used by dynamic fields cannot do this, you need to create a DB view that joins the tables and put the required data into 1 returned table.

2 0

Replies

replied on November 1, 2017 Show version history

Yes, in your Table or (preferably) View, you will have many rows that have the same building name/number (1 row per teacher) and the Dynamic Fields will only show the Unique items.

1    Washington    Jane Doe
1    Washington    Joe Schmoe
2    Jefferson        John Smith
2    Jefferson        Kelly Baker
2    Jefferson        Stacy Moore
3    Madison         Barbra Worth

Say the above is your table/view.  You will only have 3 building number options (1, 2, or 3).  If you choose 1, your building name will auto populate with Washington and your teacher selection will have Jane Doe or Joe Schmoe.

2 0
replied on November 1, 2017

Thanks Bert. That helps clarify. Only trick for me is that if I put it all in one table across the the three fields, I will end up with multiple building records for the same building/number since each building can have one to many teachers. Unless there is some other way of slicing/dicing it.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.