Handle Boolean/Two Option Fields In Scribe Data Migration/Bulk Update

No comments

I know many CRM developer get into Data migration or bulk update operation from CRM system to other external/CRM system.

I have gathered few useful tips while dealing with boolean fields as in how to check the value , reverse the value , use nested if with OR & AND conditions etc. I have categorised them into below and provided explanation & solution.

  1. Check Values from Source & Set New Value 

    To check value of a boolean field from source do this and set other value:

    IF(S1=1, 0 , 1)

    (Here i am checking if S1 field value is “1” which is “TRUE” then set the new value to “0” which is “FALSE” otherwise the default will be to “1”.)

  2. Check Combination of boolean fields and Set New Value

    To check the combination of values i.e If a=1, b=0 then set some new value, Do this:

    IF(AND(S1=1, S2=1), 0 , IF(AND(S1=0, S2=0),1 ))

    (here i am checking if S1=1 AND S2=1 then outcome should be “0”.
    please note: you can use “OR” operator as well as per your requirement.)

  3. Check If the value is Null or Any error in retrieving the value and set default value

    You might have to handle null values in the package, to do this:

    IF(ISERROR(S1),TRUE(), FALSE())

    (here I am checking if S1 is null or any error then i am setting the value to TRUE otherwise FALSE.)

    you can also combine this with checking other values to such as if S1 =1 then 1 , S2=0 then 0 & if S2=Null then TRUE().

    IF(ISERROR(S1),TRUE(),IF(OR(S1 =1 ), 0,IF(OR(S1=0),1)))



    I hope this helps! I will try post help blog on other types of fields.
    cheers!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.