Filter list

Forums Designer Building applications Filter list

  • Post
    Frenck Smit
    Participant

    Hi,

    For the filtering of a list i see there are multiple options.
    One of them i have used quite a view times is the ‘List A contains B’.
    This one only shows the items that are both in A and B.

    Another option is: ‘Remove A from B’.
    I am looking for a filtering option that excludes items B from a list A for displaying.
    Is this the option i am looking for? Or does this option really ‘Remove’ the items that are in B from the list A?

    Hope you can help me with this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Replies
    Jochem Spronk
    Moderator
    Up
    0
    Down

    Hi Frenck,

    To get your question right. So, as an example:

    LIST 1: apple, pear, pineapple, strawberry
    LIST 2: apple, pear

    If you use Remove A [List 2] from B [List 1] the outcome will be: pineapple and strawberry.
    This function only removes the apple and pear out of the list.

    So, what Triggre does is, that we create a third list C, where the outcome is pineapple and strawberry.

    Does this answer your question?

    >Jochem

    Alex Schilder
    Participant
    Up
    0
    Down

    Jochem,

    Then could you explain why this filter apparently isn’t approved by Triggre?

    null

    What I’m trying to do is: I’m creating a feature to do a request where you can add ‘drives’ for example. One request can have multiple drives, so I’ve created a table for this in which the request and drives are linked together. On a page I’ve got on the left a table with ‘available drives’ which should be filtered by the relation selected in the request. However, for every selected drive, which has been linked through a ‘create RequestDrives’ flowpart, the left table of available drives shouldn’t show the already selected drive anymore.

    I’ve tried loads of options to accomplish this, with a dropdown, table, even a flowpart etc. but none seems to work and I really don’t get why.

    This shouldn’t be that complicated. I mean, in SQL I would’ve easily be able to create something like this. For example, I’d have a query like this:

    SELECT Id, Name FROM Drives WHERE Id NOT IN (SELECT Drive_Id FROM RequestDrives WHERE Request_Id = @Request)

    I really hope you can give me a thorough example and clear explanation on how to accomplish this, since it has cost me loads and loads of time and frustration by now.

    Thanks in advance!

    triggre
    Keymaster
    Up
    2
    Down

    Hello Alex,

    Allow me to answer your question as Jochem is tied up at the moment.

    I assume your screenshot is from a table filter and you selected drives to be shown in the table: the filter rule is seen as invalid, because it expects a True/False rule, which can be tested against each drive record to determine whether is should be shown in the table or not. Your current rule has a list as outcome. I think what you want is possible, but requires some actions, instead of just a simple table filter. Here’s how I would do it:

    If I understand your case correctly, you want a page for a request with a table of drives which are not in the request on the left side. You didn’t mention it explicitly, but I’ll assume that if a drive has been selected for the request it goes to a table on the right side of the page. Also, there are three data items involved: Drive, Request and an intermediate item called RequestDrives. Each RequestDrives has a reference to one Drive and one Request (while both Drive and Request can reference multiple RequestDrives).

    You likely have a button which the user can click to add a new request. After that button, I would add:
    1. A flow part which creates a new request (such as the default Create Request flow part, or a custom flow part, as long as it has the request as output).
    2. A flow part called Get Drives. This flow part would take the newly added request from the previous flow part as input and would contain three actions:
    2-1: A look-up action for all drives.
    2-2: A look-up for all drives currently attached to the request. You can do this by using the List contains-function and would look like: List Inputs / Request / RequestDrives / Drive Contains Drive.
    2-3: A calculation action with the Remove function that removes the drives found in action 2-2 from all the drives found in action 2-1. These are all the drives not yet attached to the request.
    This flow part then has a list of drives attached to the request (looked up in action 2-2) and a list of drives not attached to the request (determined by action 2-3 as output).
    3. A page with two tables, which both show data from the user flow. On the left side you show the drives not attached to the request (from the previous flow part) and on the right side you show the drives that are attached to the request (also from the previous flow part). This page would also have a button that applies to records shown on the left side.
    4. Next comes the Create RequestDrives flow part, which takes the request from Step 1 and the selected drive from Step 3 as input. Make sure to hook this flow part up to Get Drives flow part (Step 2).

    Will that solve your case? If any part of my explanation is not clear, please let me know and I can send you an example.

Viewing 3 replies - 1 through 3 (of 3 total)

Tagged: 

  • You must be logged in to reply to this topic.

Get started for free and experience the power of the Triggre platform.

By signing up for your free account, you agree to receive e-mails from Triggre.

By using our site you agree to our use of cookies to deliver a better site experience.