how to get data in this order in xslt - xslt

this is my data:
<ALTERNATIVE_FLOW_DESC>
<ALTERNATIVE_FLOW_DESC_ROW num="1" >
Lab Technician performs the following steps to collect the specimen for the blood/urine/stool tests
</ALTERNATIVE_FLOW_DESC_ROW>
<ALTERNATIVE_FLOW_DESC_ROW num="2">
Lab technician performs the following steps to collect the specimen for the blood/urine/stool tests
</ALTERNATIVE_FLOW_DESC_ROW>
</ALTERNATIVE_FLOW_DESC>
<ALTERNATIVE_FLOW_STEPS>
<ALTERNATIVE_FLOW_STEPS_ROW num="1">
Step 1: Selects the patient from the list of my registered patients or my appointments.
</ALTERNATIVE_FLOW_STEPS_ROW>
<ALTERNATIVE_FLOW_STEPS_ROW num="2">
Step 1: Searches for the patient using regular or advanced search
</ALTERNATIVE_FLOW_STEPS_ROW>
</ALTERNATIVE_FLOW_STEPS>
I want in this order:
Alternate Flow-1
Lab Technician performs the following steps to collect the specimen for the blood/urine/stool tests
Step 1: Selects the patient from the list of my registered patients or my appointments.
Alternate Flow-2
Lab technician performs the following steps to collect the specimen for the blood/urine/stool tests
Step 1: Searches for the patient using regular or advanced search

Related

How do I include a 'between two dates' IF AND formula inside of a SUMIFS formula?

I am doing a personal budgeting project. I have 2 excel files - 1 is detail of my last 5 years banking activity, the other is an annual monthly summary and analysis (S/A) file - so 12 worksheets inside the one workbook.
I am trying to find a way to make the S/A file more dynamic so I can copy 1 formula to the various fields that look up and sum detail activity equal to or after the first date but before the 2nd date BUT ONLY for lines that match the category found in Column B of the S/A file worksheet. This gives me the activity in my budget categories between 1 paydate and the day before the next paydate.
Example: I want to find and sum all the amounts (Detail file $F:$F) in my detail file that are for Cell Phone payments (Detail File $E:$E, matching S/A field B6) where the transaction date (Detail file $A:$A) is on or after 7/14/2017 (start Date, S/A field E5) but before 7/28/2017 (end date, S/A field E33).
This is what I have tried:
=IF(AND('[2016-Present Bank Statements.xlsx]Checking TRX'!$A$2:$A$2959>(E5-1),'[2016-Present Bank Statements.xlsx]Checking TRX'!$A$2:$A$2959<E33),SUMIF('[2016-Present Bank Statements.xlsx]Checking TRX'!$E$2:$E$2959,B6,'[2016-Present Bank Statements.xlsx]Checking TRX'!$F$1:$F$2959),0)
I was getting an error trying to put ">=" into the first component so I put the cell reference -1 to get the previous date from my starting date. So anything greater than E5-1 should include the date in E5 (because let's face it, we all go mad spending on payday).
=SUMIFS('[2016-Present Bank Statements.xlsx]Checking TRX'!$F:$F,'[2016-Present Bank Statements.xlsx]Checking TRX'!$E:$E,B6,'[2016-Present Bank Statements.xlsx]Checking TRX'!$A:$A,"E5≤x<E33")
The last part "E5≤x<E33" I found on the interwebs for comparing dates.
I have tried breaking out the greater than/equal to and less than statements into 2 criteria in a SUMIFS, but no luck.
I either get back 0.00 or #SPILL
These are the headers in my details file. Do I need to rearrange them to get either of these formulas to pick up the right amount?
Date|Account|Merchant|Description|Category|Amount
My current process is to do a SUMIF but have it reference the specific lines that related to the start and end dates. I've gotten off somehow between yesterday and today and don't want to redo all my tabs so far.
=-SUMIF('[2016-Present Bank Statements.xlsx]Checking TRX'!$E$2076:$E$2168,B6,'[2016-Present Bank Statements.xlsx]Checking TRX'!$F$2076:$F$2168)
Please help!!!
Use SUMIFS. Something like:
=SUMIFS(sum_range,
type_range, type,
date_range, ">"&start_date,
date_range, "<"&stop_date)
Obviously replace ">" with ">=" if you see fit. See the simple example below.

Is it possible to create a formula that checks certain cells in a row against a lookup list and returns true/false value?

Here's a link to the spreadsheet for context. Essentially, here's what I'm trying to accomplish: In the tab titled 'Detailed Learning Report', I want column K to read "Complete" or "Incomplete" based on criteria. So, for example, for row 2, I want to check which site the UID is connected to and, depending on if it's Bedford, San Bernardino or Lithonia, determine if that user completed all required courses for that site. I have a breakdown of which courses are required per site on the tab titled 'Sheet 3'. Ultimately, at the end of this, I want a unique list of users (that's the unique list you see on the 'Sheet 3') and either "Complete" if all the required courses are marked completed in the 'Detailed Learning Report' tab or "Incomplete" if not. I'm not even sure if this is possible so I appreciate your help!
use:
=ARRAYFORMULA(IF(E2:E="",,
IF((E2:E="BEDFORD PARK IL")*
(H2:H="COMPLETE")*
((F2:F=Sheet3!I2)+
(F2:F=Sheet3!I3)+
(F2:F=Sheet3!I4)+
(F2:F=Sheet3!I5)), "COMPLETE",
IF((E2:E="SAN BERNARDINO CA")*
(H2:H="COMPLETE")*
((F2:F=Sheet3!I5)+
(F2:F=Sheet3!I7)+
(F2:F=Sheet3!I8)), "COMPLETE", "INCOMPLETE"))))
((F2:F=Sheet3!I2)+
(F2:F=Sheet3!I3)+
(F2:F=Sheet3!I4)+
(F2:F=Sheet3!I5))
can be shortened to:
(REGEXMATCH(F2:F, TEXTJOIN("|", 1, Sheet3!I2:I5)))

Trying to scrape substrings within paragraphs using regex

Main questions I have:
RegEx practices for statements that are close but not similar iterated through a list of websites when dealing with doubles and text
Should I pull all of the text then parse out what I want in the following code? Or is there a better way?
I am currently trying to extract interest rate data from different lenders using regular expression. I want to use regex because I want to be able to add more URLs as more lenders arise. I want the extracted information to basically take on the form of:
x.xx% - xx.xx% (the low - high bands of the interest rates)
Most of the websites vary in how they present this, some examples:
APR ranges from x.xx% to xx.xx%
Rates range from x.xx% to xx.xx%
x.xx% - xx.xx%
range from x.xx% (AA) to xx.xx% (HR)
Currently I am trying to just grab the paragraph the text lives in and then make substrings off of that to create the final piece of information I need (x.xx% - xx.xx%). Not sure if this is the best method, but would like to crowdsource my issue.
plcompetitors = ['https://www.lendingclub.com/loans/personal-loans',
'https://www.marcus.com/us/en/personal-loans',
'https://www.discover.com/personal-loans/',
'https://www.lightstream.com/',
'https://www.prosper.com/']
#cycle through links in array until it finds APR rates/fixed or variable using regex
for link in plcompetitors:
l = r.get(link)
l.encoding = 'utf-8'
data = l.text
soup = bs(data, 'html.parser')
paragraph = soup.body.findAll(text=re.compile('% APR'))
#using this next if statement to try and iterate through what turned up empty in the initial pass through with the first .compile statement
if paragraph == []:
paragraph = soup.body.findAll(text=re.compile('% - [0-9]'))
print(paragraph)
Which returns this:
[]
[]
[' 6.99% to 24.99% APR']
['\r\n Payment example: Monthly payments for a $10,000 loan at 3.09% APR with a term of 3 years would result in 36 monthly payments of $291.21.', 'The lender’s interest rate (APR) must not be supported by any third-party arrangements such as vehicle manufacturer subvention payments (with rates as low as 0.0% APR), other manufacturer discounts, rate buy-downs by car buying services or any other\n similar third-party subsidized rate offerings.']
['* For example, a three-year $10,000 loan with a Prosper Rating of AA would have an interest rate of 5.31% and a 2.41% origination fee for an annual percentage rate (APR) of 6.95% APR. You would receive $9,759 and make 36 scheduled monthly payments of $301.10. A five-year $10,000 loan with a Prosper Rating of A would have an interest rate of 8.39% and a 5.00% origination fee with a 10.59% APR. You would receive $9,500 and make 60 scheduled monthly payments of $204.64. Origination fees vary between 2.41%-5%. APRs through Prosper range from 6.95% (AA) to 35.99% (HR) for first-time borrowers, with the lowest rates for the most creditworthy borrowers. Eligibility for loans up to $40,000 depends on the information provided by the applicant in the application form. Eligibility is not guaranteed, and requires that a sufficient number of investors commit funds to your account and that you meet credit and other conditions. Refer to Borrower Registration Agreement for details and all terms and conditions. All loans made by WebBank, member FDIC.']

Implementing an edge search in BigQuery

I am trying to implement an edge search in BigQuery in the most efficient way, following the blog post here. Here is an illustration with two columns and three search terms how the edge search would work --
Search term: "tim burton lux" (split on space ==> "tim", "burton", lux")
SELECT * FROM mytable WHERE
# "tim"
((director LIKE '%tim%') OR (country LIKE '%tim%'))
# "burton"
AND ((director LIKE '%burton%') OR (country LIKE '%burton%'))
# "lux"
AND ((director LIKE '%lux%') OR (country LIKE '%lux%'))
Here is a SQLFiddle.
However, notice how absolutely dreadful the above search performance would be. For example, what if the table had 20 columns on three search terms? Is there a better way to implement the above using regex? I've been trying but having been able to combine the OR/ANDs in a more compact format.
A short-hand version of the above (not technically correct, but more efficient), would be doing something like:
Any column that starts with "tim", or starts with "burton",
or starts with "lux", or starts with "tim burton lux".
Probably, below will not fully address your expectations, but still wanted to share this option for below criteria:
Any column that starts with "tim", or starts with "burton",
or starts with "lux"
#standardSQL
WITH `mytable` AS (
SELECT 'Tim Burton' director, 'Luxembourg' country UNION ALL
SELECT 'tim burton', 'canada' UNION ALL
SELECT 'james cameron', 'canada' UNION ALL
SELECT 'kirk cameron', 'usa' UNION ALL
SELECT 'james dawson', 'france' UNION ALL
SELECT 'sarah silverman', 'france'
)
SELECT * FROM `mytable` t
WHERE REGEXP_CONTAINS(TO_JSON_STRING(t), r'(?i):"(tim|burton|lux)')
with (I think expected) result as
Row director country
1 Tim Burton Luxembourg
2 tim burton canada
I think this addresses "20 columns" question and looks like relatively easy to be adjusted to some variations of the above criteria
From the performance prospective - hard to say (share your testing results please) - in any case keep in mind - this is a BigQuery which is not tailored for serving interactive UI and mostly is for analytics - but keep trying ... :o)

Apex5.0 choose layout and add date validation

I am building a student module application in Oracle Apex 5.0 and wanted to know how to display the details in oracle apex.
Something like this with two tabs on the 1 page:
on first tab, When input StudentID,
the first section will contain system_date and tutor name that has login
second section should contain student name and course desc & course year
third section is to display current semester module, if payment done or not (Y /N), markings %, date of payment.
2nd tab of the page to include all courses done for that student.
Which layout to choose (interactive grid/report) or any other.
How to add validation of date picker for the payment date so that upon input it insert directly in table in DD-MON-YY format and also that it takes system_date??
Note table:
student_details: the student name, address and personal details
course_detail table contains the courses for the semester
payment_detail table for the payment details
The sort of things you're going to want to look for are:
Region Display selector, for multiple tabs
Any type of report region to display data, and you can have multiple, and nest them as sub-regions.
You can define page items that are displayed as date pickers, and use default values to source today's date using the keyword SYSDATE.
You're going to need to understand SQL.