@frank.ling1
You can use a screener to find RICs with the company name.
df, err = ek.get_data(['SCREEN(U(IN(Equity(active,public,primary))),Contains(TR.CommonName,"Machine"))'], ['TR.CommonName']) df
The above code returns RICs that the common name contains "Machine".
You can use the Eikon Excel to create the screener formula and then use it with the get_data method.
Thanks. Jirapongse.
I tried your way and find it works. But what if I need to apply multiple criteria to narrow down searching results? I tried to right the function this way:
df, err = ek.get_data(['SCREEN(U(IN(Equity(active,public,private))),(Contains(TR.CommonName,"machinary") AND Contains(TR.CommonName,"China"))'], ['TR.CommonName','OAPermID'])
but there is no result as it is in Eikon Excel. Can you check where is the error?
You missed the closing parenthesis for the SCREEN.
df, err = ek.get_data(['SCREEN(U(IN(Equity(active,public,private))),(Contains(TR.CommonName,"machinary") AND Contains(TR.CommonName,"China")))'], ['TR.CommonName','OAPermID'])