Repeating Group Record Count to Reusable Elelemnt

Hi there.
I have a Reusable Element that I am using as a table footer. The reusable element has a custom state of type number called ‘Records’. It is the number of records contained in the data table that it is the footer for.

I am able to change the number of records contained in the repeating group using filters.

How do I send the number of records in the repeating group to the state called “Records” in the reusable element?

Many thanks

Frank

Hey @frankstillone ,
You could try whenever your filter changes, trigger “go to page” current page and update the records with RepeatingGroup:count. This should set the latest count.

Thanks Alan,
What do you mean by: When Filter Changes?

I can use that to trigger a workflow to do a count of the records and send it to the state contained in the RE - but I am not sure how to trigger that wf.
Looking at

image

and

image
and not sure which to use trigger this.
I am thinking: When condition is true: but not sure what condition to use.
Can you give me more insight.

Thanks
Frank

hey @frankstillone , Could you share how have you setup your filters?

Thanks @alan.thomas111997

Does that help?

I assume these filters are changed by user in UI using dropdowns or date-pickers, in that case “When an input’s value is changed” that dropdown/datepicker as the trigger.

Thanks - that works for most of the elements on the page but I have another RE that sets a date span that is also used in the filter

image

That date span is sent to a state on the RE and then a hidden group on the page called Tools: Date Span reads that date span and uses it in the filter.

I am unable to figure out how to trigger the event when the dates in the date span change. I have tried to place an inout and read the date span but that is not triggering anything

Any thoughts

I think I have figured it out
I created a state on the page called ‘Records’, type Number that is update to the record count when the page is loaded
I have a condition on the page that is triggered every time a condition is true that tests the record count of the table vs the State on the page
If trigered it sets the state in the RE of number of records and reset the Page State ready for the next test
Seems to be working
This takes care of the need to trigger a workflow every time one of the filter options is selected
Thank you for your help
Cheers
Frank

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.