Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

Case 892 How to create a flag for company appear at vtiger ?

Hi All

I have 2 key customers list as below :-

VTIGER:
LOAD * INLINE [
COY_NAME,LAST_NAME,Email
ABB,POW,0rts@stee.stengg.com
AAA,RAT,catherine@mattenplant.com.sg

];

May i know how to create a FIELD = flag_key_acc to list COY_NAME = ABB and AAA ?

ZOHO:
LOAD * INLINE [
COY_NAME,LAST_NAME,Email
XYZ,STEVEN,
ACB,
ABC,????,
ABB,MOM,
ABB,POW,0rts@stee.stengg.com
ADD,WEE,0rts@stee.stengg.com
AAA,KIM
AAA,RAT,catherine@mattenplant.com.sg

];

Hope some one can advise me. I don't know how to start.

Paul Yeo

1 Solution

Accepted Solutions
Vegar
MVP
MVP

Yes you can use the preloaded list. Try using the Exists()  function.

VTIGER:
LOAD
   *,

   COY_NAME as KeyAcc_CoyName
INLINE [
   COY_NAME,LAST_NAME,Email
   ABB,POW,0rts@stee.stengg.com
   AAA,RAT,catherine@mattenplant.com.sg
];

ZOHO:
LOAD
   *,

   IF(EXISTS(KeyAcc_CoyName,COY_NAM ), 'Y', 'N') as flag_key_acc 
INLINE [

   COY_NAME,LAST_NAME,Email
   XYZ,STEVEN,
   ACB,
   ABC,????,
   ABB,MOM,
   ABB,POW,0rts@stee.stengg.com
   ADD,WEE,0rts@stee.stengg.com
   AAA,KIM
   AAA,RAT,catherine@mattenplant.com.sg
];

 

DROP FIELD KeyAcc_CoyName;

View solution in original post

4 Replies
Vegar
MVP
MVP

You could use match () for this.

LOAD 

COY_NAME,LAST_NAME,Email, 

If(Match(COY_NAME, 'AAA', 'ABB'), 'Y', 'N') as flag_key_acc 

FROM Source

paulyeo11
Master
Master
Author

Hi Sir

Thank you for your sharing , my actual list is very long. it is possible to make your script read Table 1 compare Table 2 ?

Paul

 

Vegar
MVP
MVP

Yes you can use the preloaded list. Try using the Exists()  function.

VTIGER:
LOAD
   *,

   COY_NAME as KeyAcc_CoyName
INLINE [
   COY_NAME,LAST_NAME,Email
   ABB,POW,0rts@stee.stengg.com
   AAA,RAT,catherine@mattenplant.com.sg
];

ZOHO:
LOAD
   *,

   IF(EXISTS(KeyAcc_CoyName,COY_NAM ), 'Y', 'N') as flag_key_acc 
INLINE [

   COY_NAME,LAST_NAME,Email
   XYZ,STEVEN,
   ACB,
   ABC,????,
   ABB,MOM,
   ABB,POW,0rts@stee.stengg.com
   ADD,WEE,0rts@stee.stengg.com
   AAA,KIM
   AAA,RAT,catherine@mattenplant.com.sg
];

 

DROP FIELD KeyAcc_CoyName;

paulyeo11
Master
Master
Author

Hi Sir

Thank you very much for your help , it work fine.

Paul