Filter expression based on a smart multi row field

Mar Demolag November 21, 2024

Hi,
I'm having trouble finding the syntax for filtering based on a smart multirow field.

Example:
I have two forms, F1 and F2, while F2 is used as smart multi-row field in F1 (lets name the field "smr").
I want to filter entries from F1 based on if their smr field contains a specific entry from F2.

What syntax should I use?

context: I want to use the queryAndRender function on merger table to show for each F2 entry a list of F1 entries on which their smr field contains a specific F2 entry, but I can't figure out the syntax for filtering based on a smart multi-row field.

 id.queryAndRender(F1:<pageID>;<filter????>;id;table)

 Thanks.

2 answers

1 accepted

2 votes
Answer accepted
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.
November 21, 2024

Hi @Mar Demolag 

Probably something like this

id:[entry.smr.transform(id).join( OR id:)]

Alex 

Mar Demolag November 21, 2024

Thanks for the response Alex.

Just to clarify,


F1 fields: name_f1(text), smr(smart multi row)
F2 fields: name_f2(text)

MergeTable: name_f2(field), queryAndRender(field), F2(table view)

in this case, wouldn't [entry] refer to the entries from F2?

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.
November 21, 2024

What is a "MergeTable"? What do you merge? 

Mar Demolag November 21, 2024

I use it more for using expressions in fields and less for merging two tables (As they are already merged by the Smart Multi Row).
Am I using it wrong?

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.
November 21, 2024

I dont quite understand... What do you merge? 

Or at least what form is the source for the TableViewMerger - F1 or F2?

Mar Demolag November 21, 2024

Sorry about the confusion.


Tried creating a simple example of what I am trying to do:
edit mode screenshto.jpg

the table merger currently looks like this:
table merger.jpg

While what I want is for each unique F2 name row to apear once in the merger table, and the second column to contain a list of each of F1's entries where the SMR field contains that name.

for example (edited image):
table merger intention.jpg

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.
November 21, 2024

Screenshot 2024-11-21 at 14.20.40.png

Where an expression for queryAndRender is something like this

id.queryAndRender(F1:@self;smr:[entry.id];name1;table)
Like Mar Demolag likes this
Mar Demolag November 21, 2024

Doesn't seem to work for me. Renders the table with only the name2 column.

also the help text in edit form make is seem like using expression in field name should only work on Table Merger:

Name of the field defined in the form (can be with 'virtual functions') or expression (supported expressions) when used in TableView Merger macro

Did I get that wrong?

 

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.
November 21, 2024

Works for me just fine and renders exactly what you have in the "edited image"

And the ConfiForms Field macro's field name parameter accepts an expression or a field name 

Mar Demolag November 21, 2024

Alright, when moved it back to the table merger, it worked.
Also I seem to have confused the flattenByField and the distinct configurations.

 

Thanks alot!

0 votes
Mar Demolag November 21, 2024

I just found the following answer on another thread, but it seems it doesn't work for me:

smr.asFilteredBy(name:[entry.name]).asCount:>0

I'm trying to use the (custom) name field specifically and not id because I have several entries with the same name.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events