I am working on a web automation in a portal.
The inputs will be Date of birth of persons and their policy number( in this portal only 9 or 11 digits is acceptable if we enter numbers other than 9 digits or 11 digits number mean a pop up will come like only 9 or 11 policy number is acceptable )
“If the number is contains greater greater than or equal to 10 digits and less than 11 digits I need add a leading to make 11 digits policy numbers and need to proceed with further process.”
“If incase the digits contains less than or equals to 9 digits means:
first I need to convert into 9 digits number then need to check whether the patient details is present or not if present then I need to proceed with further process i.e scrapping the patient details.
If the patient details are not found for 9 digits then I need to convert the number into 11 digits policy numbers to scrap the data of patient details and store the scrapped data in a excel”
Incase for the cases 9 digits and 11 digits the patient details is not means even after adding leading zeros then I need to update in excel as no patient info found.
Please anyone help me to by giving a logic.
Assuming you have an int variable,
If(intVar.ToString.Length <= 9, intVar.ToString("D9"), intVar.ToString("D11"))
If your current var is a string,
If(strVar.Length <= 9, CInt(strVar).ToString("D9"), CInt(strVar).ToString("D11"))
The above statement can be utilised in an assign or directly in Type into action
Hope this helps
Ok check and let you know thanks for your reply
Thanks for your reply will check and let you know
Can you please create a sample workflow and send me,
I used a one if condition like:
in then state: policynum=policynum.padleft(9,"0"c)
in else state: policynum=policynum.padleft(11,"0"c)
what to do next
Actually first I need to check for 9 digits number whether the patient details will available or not after adding the leading zeros to make it 9 digits policy number, if details found then i need to scrap the data, if not I need to add leading zeros to make 11 digits then check the patient info if found then I need to scrap the data,
if not found in the both cases then I need to mention in the output as “No patient info found”.
Please find the attached workflow for your reference.
HeartyCatcher_PolicyNumber.zip (66.9 KB)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.