Str_CompanyCode : 4001 or 8551 or 8561…etc (this value will be captured from website)
Str_PurchOrg : [0001] HMP or [0001] HCP or 0005 or PIND…etc… (this value will be captured from website)
Now bot has to check if Str_CompanyCode is starting with 40 or 85 then the Str_PurchOrg should have PIND and match with below DB rows and pass output as Yes else No
If Str_CompanyCode is OTHER than starting with 40 or 85 then Str_PurchOrg can be any value and output value will be Yes
Note : If above logic can be achieved without referring DB. Please suggest the logic
DB :
CompanyCode
PurchOrg
40
PIND
85
PIND
Example :
Success 1 : When Str_CompanyCode is 4001 and PurchOrg is PIND
Success 2 : When Str_CompanyCode is 5001 and PurchOrg is HCP
Failure : When Str_CompanyCode is 4001 and purchOrg is [0001] HMP or any value (Except PIND)
use for each row in datatable activity
inside use
Currentrow(“CompanyCode”).tostring.contains(Str_CompanyCode.substring(0,2)) and Currentrow(“PurchOrg”).tostring.contains(Str_PurchOrg)
if Str_CompanyCode is starting with 40 or 85 then Str_PurchOrg should be = "PIND " OR if Str_CompanyCode is NOT starting with 40 or 85 then Str_PurchOrg = Any Value
Then expected output is “Yes”
Failure Scenario :
if Str_CompanyCode is starting with 40 or 85 then Str_PurchOrg = Any Value