Using a field in form A to filter a table with data from form B that is embedded in form A?

Gianna T
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 29, 2022

Hi, I am working on developing a form that allows users to choose packages from a dropdown. While the package names are in the dropdown, I need to have a table embedded in the form that displays what items are in the packages, filtered by what package(s) is/are selected. The table with the items do not need to be saved, as that data exists in a separate Master file, but it needs to be shown so the user can see what is in the package(s).

The one to many relationship seems to throwing things off, and I haven't been able to find a filtering technique or workaround using multiple forms that has been successful. The Filter Control function does what I am looking for, but there is no way (that I know of) to save the package names the user selects in the filter, which would require them to enter the same thing again in the main form's package field. This is not ideal from a usability standpoint, so if anyone knows a solution or workaround, I am all ears! :)

 

1 answer

0 votes
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 2, 2022

Hi @Gianna T 

Welcome to Atlassian community

This is a bit tricky, but possible with some help of a JavaScript and use of ConfiForms REST APIs

http://recordit.co/0PYdbLN1mH

Complete configuration, with all the scripts is available at this page: https://wiki.vertuna.com/display/CONFIFORMS/Shows+row+details+of+a+selected+item+-+form+configuration

Alex

Gianna T
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 5, 2022

Hi @Alex Medved _ConfiForms_ , thanks for your help! This is great.

It looks like the table that you embedded in the example only shows one row for each dropdown value - is there a way to do this with a one-to-many relationship? I know the "Label" column has multiple values, but for the data structure and size that I'm using, that unfortunately wouldn't be conducive for the front or back-end users.

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2022

Oh, this is not limited to just one row in any way.

The example just shows one row as the main idea is to show "more details" of the record when it is selected.

And that is why we load just one record by it's id

var apiCall = AJS.params.contextPath + '/rest/confiforms/1.0/search/' + AJS.Meta.get("page-id") + '/formB/id:';

You can have a call to ConfiForms API with a filter/query you want and show connected data the way your business "connects the data"

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2022

And to your comment about the "label" field we have on the demo - it is not related to anything like master-detail forms or data tables. It is just an example we have for other users on how to render data they requested for different types of fields

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events