Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get a Smart Dropdown to JOIN based on another dropdown?

Kathleen Janiszewski
Contributor
June 5, 2023

I have a ConfiForm full of fiscal years, week numbers  and text for each week that I want displayed on a smart dropdown.  Right now, I have all of the weeks for FY 2023 and FY 2024 in there.

weeks confiform.PNG

I also have a dropdown with the fiscal years hardcoded in the dropdown:
fiscalYear.PNG

I want the smart dropdown to populate with the week titles (there could be 52 or 53 of them) depending on the fiscal year.  How can I do a JOIN from the fiscalYear field to the Fiscal Year of the smart dropdown?  I have tried a smart classifier, but this won't work, because they're in different div's.  I tried a filter, and that did not work.  Any ideas?

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
June 5, 2023

Hi @Kathleen Janiszewski 

The easiest way is just to put a smart classifier field in the form that will use your weeks form as a source.

No need to join anything

First field in the smart classifier would be the year and the second would be the week number or the week range

Other option is to set up 2 fields, one to source the data from years form and another from the weeks form and use the https://wiki.vertuna.com/display/CONFIFORMS/ConfiForms+Field+Definition+Rules#ConfiFormsFieldDefinitionRules-ApplyFilteronafield rule to filter out items from the second field (weeks) based on the selection being made in the first (year)

Alex

Kathleen Janiszewski
Contributor
June 6, 2023

Alex,

The Fiscal Year is at the top, and the Start Week and End Week are in a 2nd div that is hidden and unhidden based on the next value, which is a radio button.  Is it possible to use a smart classifier when the dropdowns are not sequential?  According to my colleague, it's not.  This is what my registration form looks like:Registration form.PNG
Thank you for your help here!

-Kathleen J

Alex Medved _ConfiForms_
Community Champion
June 6, 2023

Hi @Kathleen Janiszewski 

Not sure what do you want to show with this screenshot, but your colleague is right - the smart classifier field cannot be split into multiple pieces. It is just one field - it can be rendered as an N number of (cascading) dropdowns (selects), but it is still a 1 field.

Alex

Kathleen Janiszewski
Contributor
June 6, 2023

Alex,

Sorry to have blacked out so much.  The user selects the fiscal year.  The next field is a radio box which I'll call, "type."  Depending on "type", the bottom div will display or not display.  The Fiscal Year is relevant for all types.  The Start Week and End Week are only relevant for 1 type.

Yes, the 2nd method you had recommended is the one I was going with.  I wasn't able to get it working.  Perhaps my filter is incorrect.  Or perhaps I need to put the years in their own form rather than having them hardcoded.  I can do that, but the value and text are the same: years 2023 thru 2030.  However, I doubt they'll be using this software beyond FY 2026.

Thank you again for your help!

-Kathleen

Alex Medved _ConfiForms_
Community Champion
June 6, 2023

What filtering expression do you have? And what is the form configuration (field names in the weeks form)?

Alex

Kathleen Janiszewski
Contributor
June 6, 2023

Alex,

The field names in the weeks form are fiscalYear, weekNumber, weekRange, and uniqueId (I don't use uniqueId yet).

The filter is in the ConfiForms Rules for Field Defintions for fiscalYear, below:

Confiforms Rules on fiscalYear 1.PNGConfiforms Rules on fiscalYear 2.PNGConfiforms Rules on fiscalYear 3.PNG

I think the problem is that I'm not linking this rule to the definiton of startWeek.  How would I do that?  I tried a number of different scenarios last night, and I don't remember them all.

confiforms startWeek field defintion.PNG

Thank you!

-Kathleen

Alex Medved _ConfiForms_
Community Champion
June 6, 2023

Hi

I was talking about this Field Definition Rule - https://wiki.vertuna.com/display/CONFIFORMS/ConfiForms+Field+Definition+Rules#ConfiFormsFieldDefinitionRules-ApplyFilteronafield (Apply Filter on field)

Here is the demo of what I was trying to suggest

http://recordit.co/3hPgVaNP8t

Alex

Kathleen Janiszewski
Contributor
June 6, 2023

Alex,

Yes!  That got it working!!!  Thank you for your help!

Kind Regards,

-Kathleen

Kathleen Janiszewski
Contributor
June 7, 2023

Alex,

I still need the dropdown to store the week numbers, not the test on the labels.  I expect it to work the same way a regular dropdown works.  My code is completely dependent on week numbers.  See below:

Week Ranges.PNG

Thank you in advance.

-Kathleen

Alex Medved _ConfiForms_
Community Champion
June 7, 2023

I don’t quite understand this.

Smart fields store a reference to a record… which can be used to get any fields in the form that it references…

Alex

Kathleen Janiszewski
Contributor
June 7, 2023

Alex,

Thank you.  My colleague helped me to get the data I needed from [entry.startweek.weekNumber]

Thank you again.

-Kathleen

Alex Medved _ConfiForms_
Community Champion
June 7, 2023

Yes, that is what I was trying to hint at - you can use smart fields as a "bridge" to jump to the values/fields that it is referencing in the other form

Good to have such a great colleague! :-)

Alex

Like Kathleen Janiszewski likes this
Kathleen Janiszewski
Contributor
June 8, 2023

Alex,

Yes!  He's awesome!

Thanks again!

-Kathleen

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events