Multiple List Iterations

Dear all,
following constellation.
The algorithm should iterate for each user and find each claim created by each user based on user email. So, output in the RepeatingGroup should be: show all claims for all users.

Data type: User.
Data type: Claim (Field: UserEmail)
User1 created: Claim1, Claim2.
User2 created: Claim3, Claim4, Claim5.
Output: Claim1, Claim2, Claim3, Claim4, Claim5.

Following iteration algorithm:
For (i=0; i<maxUsers; i++)
for (k=0; k<maxClaims; k++)
{ user email = i`s CurrentPosition UserEmail;
show Claim in RepeatingGroup;
}

I tried different Iteration Plugins but obviously i do not have enough knowledge about iteration functions. Would you please provide feedback how to implement given iteration algorithm with Bubble.

Thank you in advance.
Regards, Val.

hi @valera.rwth!

if I understand you correctly, you simply need to display a repeating group with all claims created by all users, correct?

you see this is the beauty of nocode;

  1. Set the RG datatype as claims,
  2. the datasource should be do a search for Claims.

Forgive me if I misunderstood your question, but this really seems to be it.

Hello Hanan1,
this solution only works for one User like User: first item.
I tried it already it several variants but one thing is missing here: do a claim search for each User.
Bubble algo works like: take User1, find all Claims for User1 → OK. But what about other Users?

I need to iterate:
Do a search for Claim → email = IterationCurrentPosition User`s email
and then display output of all iterations in the Repeating Group.
Any idea about that?

Regards
Val

hey @valera.rwth , I don’t understand what users have anything to do with it :thinking:You need to display all claims, then do a search for claims displays all claims unless a privacy rule exists. Here, check this. Run it as any user you like and you will still see all claims.

@hanan1,
here are pictures of a search that i am trying to implement.

Search

Search1

Search for Claims for each User

Field “company email” has multiple entries, which does not fit because “company email” is a text and not a list. Is there a possibility to separate these entries and assign them to the field “company email” one by one?

Thank you for reply
Best regards
Val

It looks to me that this constraint is superfluous. Just remove it and you will see the full list. Why do you need to bring each user’s claims one by one to compile a list when you can bring them all together in a simple search term?

try it out without the constraint.

Without constaints it will be not the desired search result.

There are several Companies in the database.
Each Company has several Users assigned to a given Company.
A User of a Company can be mentioned in a Claim.
So, for a certain Company i need to find all claims, where Users of a given Company are mentioned.

To be fair, this wasn’t what it sounded like in the beginning :grinning_face_with_smiling_eyes:

so your database structure is important, I tried to understand and replicate your issue, and I think this is how the constraint should look assuming that a company is related to a many other companies(which I called clients):


ezgif.com-gif-maker (14)
this is my best shot :woman_shrugging:

Thank you. I will try to implement it into my application.

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