Reusable Element with Repeating Group - Do search for... with merging and constraints using data from URL - address help

I have lots of repeating groups that display Do search for… on different pages.

For example, I have an Expense page that displays all expenses with constraints being used for filters.

Then on the Contact page I display Expenses that are only related to that contact whether the Expense has the Contact Full Name, Contact Business Name or Contact Address. This is done using merged with… and constraining each Do search for… with the full name, business name or address along with constraints for the filter.

When the repeating group that displays expenses is on the Expense page or Contact page using the methods described above, it works! But then when ideas refine or some tweaking needs to be made I have to change it on several pages - you know how it goes.

Plus it’s not only expenses. It’s also income, projects, time, marketing and more.

Thus the attempt to use a reusable element that has the repeating group in it.

The goal is to use the reusable element for everything (duh) and use conditionals based on parameters to change the data source.

So far it’s working fine on the Expenses page, no problem. It’s working fine on the Contact page for the full name and business name using the merged with and then constraining using get from URL. It is not working with the address, however. The last piece of the puzzle (for the expenses at least).

My data types are set up as follows:

Contact: Full Name: Text
Contact: Business Name: Text
Contact: Address: Geographic address
Expense: Expense Description: Text (this gets saved from a dropdown whose source is Contact: Full Name merged with Contact: Business Name)
Expense: Address: Contact
Expense: Address txt: Text

I had to create Address Txt since the parameter is text. As time goes on, I may not need Address: Contact. I will see.

So, in my reusable element, I have a constraint:
When get page (parameter) from page url is “contact page”
data source is
search for expenses (Expense Description = get name (parameter) from page url, ignore empty constraints checked - still need to add my filter constraints)
merged with search for expenses (Expense Description = get businessname (parameter) from page url, ignore empty constraints checked - still need to add my filter constraints)
merged with search for expenses (Address Txt = get address (parameter) from page url, ignore empty constraints unchecked - still need to add my filter constraints)

I’m getting different results based on if the contact has a combination of full name, business name, and address.

If the contact has all 3, the results are as expected.
If the contact has only a full name, all expenses are populating
If the contact has only a business name, expenses without addressed are populating
If the contact has a business name and address, all expenses are populating.
If the contact has only an address, all expenses are populating.

When I check ignore empty constraints in the data source for the address part of it, the following happens:

If the contact has all 3, the results are as expected.
If the contact has only a full name, all expenses are populating
If the contact has only a business name, all expenses are populating.
If the contact has a business name and address, all expenses are populating.
If the contact has only an address, all expenses are populating.

So, it seems that for the search for expenses with the address constraint, ignoring empty constraints give results further from the desired outcome. This is troubling because I need this selected to add my filter constraints.

Any suggestions on a solution? I realize I many not have described the problem well enough. So, I’ll post any requested screenshots or share the editor in a PM.

I’ve read a few forum posts where people are discussing sending data to a repeating group that is in a reusable element. None seem to offer a solution, hence, this post.

Also, I’m thinking that maybe I might not be able to get it to work with my Expenses because of this whole address thing. But, I might be able to get it to work with my other parts of the app.

Thanks!

This post may be of some help

Thanks, I’ll take a look at it.

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