Can queryAndRender function be distinct filtered to show unique results only?

Mar Demolag November 28, 2024

For example, if I have forms:

  • F1
    • name1: Smart Dropdown from F2
    • info: Text
  • F2
    • name2: Text

and I want to make a TableView with the following:

  • F2.name2
  • table of unique F1 info values where name1==entry.id.

 

I tried the following, but it seems it doesn't seem to work:

id.queryAndRender(F1:@self;name1:[entry.id];info;table).uniqueBy(info)

Is it possible to distinct filter a queryAndRender tableview?

2 answers

0 votes
Mar Demolag November 28, 2024

a possible solution I thought of would be using an expression instead of a field on the fields list:

queryAndRender(<formName:pageId>;<FILTER>;<FIELDS_OR_EXPRESSIONS>;<VIEW_TYPE>)

but for some reason it doesn't recognize expressions when I put them there.
Am I missing something regarding the usage of that function?

Whenever I try to put an expression there, no matter how simple the expression is, it just render the whole table, ignoring the fields.

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 28, 2024

What expressions "it doesn't recognize "?

Mar Demolag November 28, 2024

for example, I tried to put info.asCount() just to test it out also ([_count]), ([entry.)_count]) (_count).

queryCount doesn't fit there at all since there is a semicolon in it.

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

What should be unique? The value in the “info” field?

Mar Demolag November 28, 2024

yea

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 28, 2024

No, not with the queryAndRender

I think you will need to have something like a ListView with a nested and dynamically filtered TableView/CardView (where you can use distinct parameter)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events