Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content
  • Adding an if/then/else to a Lookup block


    Manoj Chaurasia

    Question:

    I am told that it is possible to add some conditional logic to a Lookup step inside Scribe Online.  It appears that you can drag an if/else block below the Lookup but it isnt clear how to write the formula.  Has anyone been able to get this to work? 

     

    Answer:

    A common pattern used in Scribe is this:(see attached Sample)

    Do a lookup and right after the lookup, add an IF /Else block to determine if  that particular record lookup, was successful or not.

    You can add as much lookups and If blocks as you need to determine the exact results and actions needed in your App Flow design logic.

    Result.RecordsMatched can have three results:

    match = 0 ; no match found, in that case the lookupfields are set to NULL, (no use to keep using these resultsets as it will most likely generate errors in the next lookup or update block.)Sometimes this is what you expect in order to do an alternate lookup (i.e. lookup account, if account not found, lookup contact.) 

    match =2 ; meaning multiple matches have been found, this is usually also not a good result, since you will need to use a Fetch block to loop thru all the different match results. (a lookup only shows one resultset, no matter how many matches you have.)

    match =1 ; usually this is what you expect from a lookup result and this asserts you that your data is ready for the next step in the integration.

    patternlookupandvalidateresultmaps_json.txt


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...