Filter router condidtion with variable and array - if exist do something, if not do else

What are you trying to achieve?

Trying to solve problem with filtering router condition with some Excel 365 module…
OneDrive read files from folder (first file), check Worksheets, List Rows for files downloaded from other scenerio.
I did “Compose a string” to get text value for Array aggregator. Array Agreggator check for specific file (file two) every value of RowID and one column (call it Text). Next from list of files on OneDrive (file one) building everything what want to add to. Another module Iterator check if some value from file two exist in first file (or inversely). Router should in filter have condition, that “exist” run update to Excel, “not exist” add new Row. How that can be done? Router not compare values even if they equal.
In screenshot 53.Text and 19.Text have the same value = 11122357

Steps taken so far

Array operators, Text Operators, Row Text, Row Value

Screenshots: scenario setup, module configuration, errors

Welcome to the Make community!

Please take a screenshot of your filter, not the output.

You have not yet provided sufficient information to demonstrate the problem that would allow us to reproduce the scenario and any error(s).

To allow others to assist you with your scenario, please provide the following:

1. Relevant Screenshots

Could you please share screenshots of your full scenario? Also include screenshots of any error messages, module settings (fields), relevant filter settings (conditions), and module output bundles. We need to see what you’re working with to give you the best advice.

You can upload images here using the Upload icon in the text editor:

2. Scenario Blueprint

Please export the scenario blueprint. Providing your scenario blueprint file will allow others to quickly recreate and see how you have set up the mappings in each module, and also allows us take screenshots or provide module exports of any solutions we have for you in return - this would greatly benefit you in implementing our suggestions as you can simply paste module exports back into your scenario editor!

To export your scenario blueprint, click the three dots at the bottom of the editor then choose ‘Export Blueprint’.

You can upload the file here by clicking on this button:

3. Output Bundles of Modules

Please provide the output bundles of each of the relevant modules by running the scenario (you can also get this without re-running your scenario from the History tab).

Click on the white speech bubbles on the top-right of each module and select “Download input/output bundles”.

A. Upload as a Text File

Save each bundle contents in a plain text editor (without formatting) as a bundle.txt file.

You can upload the file here by clicking on this button:

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

Providing the input/output bundles will allow others to replicate what is going on in the scenario, especially if there are complex data structures (nested arrays and collections) or if external services are involved.

Sharing these details will make it easier for others to assist you.

There are too many confidential data in this files… is there antother way to share?

You can also use the Hire a Pro category to request for private 1-to-1 assistance via video call/screenshare/private messaging/etc. This may help you get your issue resolved faster especially if it is urgent or contain sensitive information. It is important to post your request in the Hire a Pro category, as forum members are not allowed to advertise their services in other categories like here (even if it’s free/unpaid). Posting in the Hire a Pro category will allow other members to assist you over other forms of communication.

Alternatively, you can contact Make Support.

Directly contacting support can often lead to a faster resolution. Make support has access to your specific account details, scenario and scenario logs, server-side logs, and internal tools and resources, which allows them to investigate more thoroughly than what you have access to. Additionally, sharing potentially sensitive information about your account, scenario variables, and output bundles might not be advisable as it is a public forum.

You can open a new ticket here, or if you are unable to login for some reason, you can create another new free Make account to access the ticketing system (which is only available to logged-in users). After submitting a new ticket, you will receive an automatic confirmation email with the subject “Ticket Created” in the subject. If you do not receive this, try sending the ticket again.

If you manage to get your issue resolved with support, we’d still love to hear about it! Sharing your solution on the forum can help others facing similar problems.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

Hi @Mateusz_Damazy_Horow

Your problem seems like to compare folder name form one sheet in excel in sheet with the other in the sheet 2. And if the file exists run an update and not exists add a new row. You can do this by utilizing the search row module of google sheets for listing the column rows that you specified in the sheet 2 and then aggregating it to form an Array. After that add an other search row module for sheets 1 and add a router to filter out whether to Update or Create. In the filter section of the create Array operator contains filter condition compare the array with each row with sheet 1, if it exists update the rows. In the filter section of the next route if it does note exists filter you can add new row.



The mapping in the filter Array is to specify the array elements to filter the condition. you can use this based on the your array elements RAW name. And then use Array operator contains filter to filter out each and and every row values in the particular field

Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation

1 Like

Thank You @Msquare_Automation.
Your answer point me to right direction.
First of all in map function second argument must be typed as a text. I didn’t knew that before.
Second Array aggregator from Excel 365 List worksheet row only can build array with RowID as value and Row as collection.
And this is the tricky one part. If You must use value from collection, it must be whole name of that collection and value.
In my example it was “row.a.text”. BINGO!

Now I have four updates and one adds.
Make - make my day (;

2 Likes