Setting the value of a Smart Dropdown Field

Erin Smith September 20, 2021

Hi Team (Alex),

I'm hoping your can work your magic for me again. My form is working great, but Management has asked for a new feature, the ability to cancel an entry.

I can pull all the information back into the form using a Primary Key, but when I try to pull the value of the Smart Dropdown back into the field it won't show the data.

This is what I'm using: Seat1=[entry.PrimaryKeyReference.Seat1.Seat]    Where Seat1 is the Smart Dropdown field on the form, and Seat is the column in the referenced form.

For all the other fields this works as expected: Date1=[entry.PrimaryKeyReference.Date1] for example pulls the original date submitted for the selected PrimaryKeyReference.

 

As always, any guidance is appreciated.

Thanks.

1 answer

0 votes
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 20, 2021

Hi

A bit hard to understand the data model... but probably  you just need

Seat1=[entry.PrimaryKeyReference.Seat1]

Alex 

Erin Smith September 20, 2021

Hi Alex,

With or without the ".Seat" the field doesn't populate.

 

More info:

The part of the form I'm working with is a seat booking form.

People can select the Date, Location, and Pod, and based on those selections the Smart Dropdown filters to a reduced list for the requester to select a seat.

Once that is done, Management has asked that there be functionality to cancel the entries.

So using the reference number generated on creation, the requester can pull their record up and select to cancel it.

The form is fine pulling up the record details for the Date, Location, and Pod, but it can't seem to pull back the Seat selected.

 

Hope that helps you understand my question.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 20, 2021

Thank you for your attempt explaining!

What I am after is to understand what is "PrimaryKeyReference" and what is "PrimaryKeyReference.Seat1" and what is "Seat1"

This is what I mean saying about data model... Knowing something about " Date, Location, and Pod" is not really relevant here, as these are missing in the expression you have and add more noise than help... 

Alex

Erin Smith September 20, 2021

Hi Alex,

Gotcha.

Okay, PrimaryKeyReference is a smart dropdown referencing the Autonumber that is generated with each request on the form. So if I submit a seat booking I get a confirmation number VRTO-#. I can then use that number to look up my request and cancel it if necessary.

Seat1 references the seat I have selected when booking. Seat1 is the field name for the smart dropdown that references a secondary form that lists all the available seats.

Hope that helps, and thank you for all your help.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 20, 2021

So, in the form that is referenced through the "PrimaryKeyReference" field you dont have a "Seat1" field?

It is even more complicated now...

Let's start from the initial question - you are using Seat1=[entry.PrimaryKeyReference.Seat1.Seat] 

which means you want to get a "Seat1" through the field "PrimaryKeyReference". Navigating to it through this field to the source form (configured for your smart field). Which means you assume you have a field "Seat1" in that form... do you?

Erin Smith September 20, 2021

Yes, the main form (that PrimaryKeyReference is referencing) has the field Seat1. That field is a smart dropdown field that is referencing the field "Seat" in the secondary form.

When a user first goes to the main form, Seat1 is chosen from the values in the secondary form as listed in the field Seat.

When a user needs to cancel an entry in the main form I need Seat1 to pull the value from the referenced entry in the main form, but (and this is the tricky part), Seat1 still needs to be connected to the secondary form so it can update that form with the cancellation (as you showed me how to do in another question - Thank you again for that).

I know, so confusing. Feel free to tell me it can't be done.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 20, 2021

Oh, could you provide some visuals? 

Is it so that "PrimaryKeyReference" field references the SAME form (I mean "linked to itself")? This is confusing - I just dont get where you have Seat1 and Seat and how this things are connected together.

Is it so that PrimaryKeyReference and Seat1 are connected to the same form? 

Do you have 3 forms or 2? Could you tell or show what fields and their types has each form?

Erin Smith September 21, 2021

Hopefully this looks the same on your side as mine.

Picture One: Form One where users book or cancel their seats.

Base Form.jpg

Picture Two: Form One in Edit mode

Base Form Edit.jpg

The red column is the Seat column with fields  Seat1 through Seat5. These fields are smart dropdowns that reference the second form.

Picture Three: Form Two Smart Dropdown Database:

VRTO Database.jpg

When users select the Date, Location, and Pod in the first form it filters the list of available seats in this form/database (field Seat). When they hit submit in the first form it updates this form to show the seat is booked and generates an email with the auto number generated reference number.

For the Cancellation piece, I want to use the the reference number from Form One to pull up the information booked (Date, Location, Pod, and Seat (field Seat1)), so the user can choose to cancel their booking. 

Right now though, the rule to pull back the information from the saved data in Form One isn't pulling back the corresponding seat. 

Hope that helps clear things up.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2021

OK, Now I kind of see what you have as a form (view) - but the missing part is field definition types!

What is "PrimaryKeyReference" field definition and how is it configured?

What is "Seat1" and how is that configured?

Alex

Erin Smith September 21, 2021

Hi Alex,

PrimaryKeyReference is a SmartDropdown referencing Form One and the previous entries submitted based on the autonumber.

PrimaryKeyReference.jpg

Seat1 is a SmartDropdown referencing Form Two.

Seat1.jpg

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2021

OK, thanks. So the "PrimaryKeyReference" field is referencing itself (same form where this field is configured)

Then it is just like I have said earlier

Seat1=[entry.PrimaryKeyReference.Seat1]

No other way

Alex 

Erin Smith September 22, 2021

Thanks Alex.

Might be a glitch in Confiforms, or TD's version of Confiforms that is preventing the field from populating.

I have a work around to reduce the seat list and then the requester can just reselect the original seat before cancelling.

Thanks.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 22, 2021

This is quite a fundamental functionality of ConfiForms

I dont believe this works differently between versions. Unless you are on a very very old version of ConfiForms

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events