Skip to main content

Apply filters

Comments

8 comments

  • METER Group
    Celigo University Level 1: Skilled

    On the operand section,

    When set to 'Field' I want to know why no field values appear in the picklist.  For example in my custom flow when I have the filter in my previous lookup set to the variables I intend to use (actually, I'm not sure whether that is related).

    I need to know when to use 'value', and when to use 'expression'.  I have a response mapped field  called K_data (mapped from data), and the filter doesn't work when I set the operand type to 'value', but it does for 'expression'.  Why?  

    0
  • METER Group
    Celigo University Level 1: Skilled

    In the section "Navigating the filter editor", in the first picture, is 'NOT' enable or is 'NOT' disabled?

    0
  • METER Group
    Celigo University Level 1: Skilled

    Another thing that would be extremely helpful would be to describe the syntax/formating for the various Operand Type options.  Do I need to put Operands in quotes  (e.g. "Opp_data"), and does that answer change based on the Operand Type?  What about the values that I'm looking for (the right side or RVALs)? Do they need to be open? in single quotes? in double quotes?  and does the type of single quote matter like it does in SOQL queries where I can't paste in the fancy curved single quotes that a Google Doc generates? (That is a terrible thing to have to debug, by the way. I edited my query in a google doc and pasted it into the SOQL query window and spent a full day trying to figure out that it wouldn't work because google doc only allows you to type curved quotes, and the query ONLY understood straight ones).

    Can I put in an array name to see if 'is empty', or can I only put in individual values (array[0].member)? and, how do I format a member?  array.member?  array.0.member?  array[0].member?

    0
  • METER Group
    Celigo University Level 1: Skilled

    You mention the option of creating a javascript filter, but then you don't give any guidelines on how to save that javascript filter.  If this is not the best document for that information, then please put in a link that tells about creating js files and functions.

    0
  • Tom Santiago Senior Technical Writer Community moderator
    Engaged
    Top Contributor
    Celigo University Level 4: Legendary

    Hi METER Group,

    Thanks for all of this feedback on filters:

    • I've revised the article to explain that the NOT filter is actually enabled by default in the current UI, thanks for bringing this to our attention.
    • In testing, with a string value equals operator, no quotes, single quotes, or double quotes all produced the same results and the behavior of the filter operated as expected. Do not use smart quotes.
    • When accessing an array, I was able to successfully create an "is empty" filter using the syntax arrayName.0, but I am still researching the nuances of when to use alternate array referencing syntax (arrayName[0] for instance). I will revise this article according to my findings. 
    • We have an initiative to make our JavaScript content more robust throughout the knowledge base. I'll make sure to notify you of new content on that front as it occurs.

    Our Support team will be contacting you soon about the other issues you've brought up. This is great feedback, Kenneth. Thanks for your patience while we address the rest of your concerns.

    0
  • Steve Klett Channel Partner
    Awesome Follow-up
    Engaged
    Celigo University Level 2: Seasoned

    I've skimmed this document and I don't see a complete example of what a Javascript filter looks like. Is it a series of nest arrays like NetSuite's filter expression? Is there a function I need to add that will be automatically called? A sample showing what is expected would be useful, without this I'm moving on and not able to use the feature.

    0
  • Stephen Brandt Documentation Manager Community moderator
    Engaged
    Great Answer
    Top Contributor
    Celigo University Level 3: Master

    Hi, Steve Klett. As mentioned, we still need to build out the documentation with sample JavaScript. I regret the slow pace and for not filling the hole that we let you fall into.

    The object passed and the expected return value are actually simpler than you proposed:

    /*
    * filterFunction stub:
    *
    * The name of the function can be changed to anything you like.
    *
    * The function will be passed one 'options' argument that has the following fields:
    *   'record' - object {} or array [] depending on the data source.
    *   'pageIndex' - 0 based, context is the batch export currently running.
    *   'lastExportDateTime' - delta exports only.
    *   'currentExportDateTime' - delta exports only.
    *   'settings' - all custom settings in scope for the filter currently running.
    * The function needs to return true or false.  i.e. true indicates the record should
    * be processed. * Throwing an exception will return an error for the record. */ function filter (options) { return true }

    I suppose, there's not much advantage to a JS filter over a downstream hook, unless it's a matter of precisely where you want to remove the records within the flow. 

    1
  • Steve Klett Channel Partner
    Awesome Follow-up
    Engaged
    Celigo University Level 2: Seasoned

    Thank you Stephen Brandt - I'm already crawling out of my hole. ;)

    I decided to add more to this comment. The reason I'm looking into JavaScript rules is due to the inflexibility of the rules editor. It's a good system, I wish I could use it more, but there are some limitations that can make it a real nightmare:

    1. Can't move a rule into a group
    2. Can't move a group into another group
    3. Can't re-order rules (nice to have)

    #1 and #2 are critical if the requirements changed. Let's say you started with an OR group and have several levels of child groups and rules. Then a new requirement to have a TOP level rule that must be AND'ed with all the other stuff. You can't do this, instead you need to either throw it all out and re-create it (very time consuming and error prone) or add that new top level rule to all of the groups that are in the top level OR group. Neither is a good choice.

    I don't mean this to sound so whiny - but if the Ruled editor got some developer love and supported re-organizing it would be MUCH better. Also, the group boxes are hard to see. It looks pretty, but it's difficult to see them, I'd prefer a much higher contrast UI.

    0

Please sign in to leave a comment.