I am trying to create a metric in OBIEE using the following formular but getting a syntax error. any help will be appreciated.
COUNT (DISTINCT CASE WHEN "Application Event Details"."XNAME" IN ('Hired - External') AND "Job Information"."Title" LIKE '%Intern%' OR "Job Information"."Title" LIKE ‘%Intership%’ THEN "Application Details"."Pi X" END)
Related
I'm trying to select an email in my automation code in outlook. I want to select the email by the name but the name contains the send date that I don't know. So I'm trying to find it out after Xpath.
Here is how I try to find it.
'//#[starts-with(normalize-space(text()), "From user-1, Subject testing sendmail,")]'
I get this error:
Original error: Invalid XPath expression: //#[starts-with(normalize-space(text()), "From reporter-user-1, Sub
ject testing sendmail,")]
//# is invalid syntax. If you want to check name attribute you need to use either //#* or //#name
I usually report the events when it passes or fails like:
Reporter.ReportEvent micPass," Title of the passed Event", " Description of Passed Event"
And
Reporter.ReportEvent micFail," Title of the failed Event", " Description of Failed Event"
Is it a good idea to hard code the line number in the title or description of the event like ?
Reporter.ReportEvent micFail," Test Failed at Line 432 ", " Please check line 432 "
To answer the 2nd part of your question, hard-coding will not be a good idea. If you hard-code the line number and in the future, a few lines get added to the code above that line number, the whole point hard-coding goes in vain as the report will now contain the incorrect-line number(which was hard-coded).
And for the first part, I can understand why you want the line-number to be reported. But I don't think there is any "predefined" way of doing it.
But, you can make your own function to get the line number. Here's an idea that you can implement:
Go to the location where your QTP test is stored. Get the full path of the file script.mts(you can find it inside the Action1 Folder). Also, this path can be constructed dynamically if you have good framework and proper folder structure.
After getting the path, you can open that file(script.mts) as a text stream(using the filesystemobject) in Read only mode.
Now you can traverse through the file line-by-line searching for the text "Reporter.ReportEvent micPass," Title of the passed Event", " Description of Passed Event"". After you have found it, you can easily get the line number and return that from your function to store it in some variable which you can use while reporting.
I have not tried this method myself but would have surely given it a try, If I really needed it.
Hardcoding is not a good idea from an end user perspective. In case it's a regression suite it could be used by a tester who doesn't know how to debug the code or analyze. To get the root cause of the failure through reporting (micPass/micFail) you can further refine your scripts
I'm currently getting an unusual error message in that during the run of my BDD scripts, I get the following response when running through the command line:
Feature: As a user I want to purchase a mobile on a monthly plan
#ACQ_Test_01
Scenario: Buy a pay monthly phone
Given I am on the Store Homepage
When I click on the Mobile Phones roundel link
And I select a "Apple" "Iphone 6s"
-->And I select the "1GB+AYCE min" price plan<--
Then I can complete my order
1 scenario (1 undefined)
5 steps (1 skipped, 1 undefined, 3 passed)
0m0.130s
(The one in arrows is the one highlighted in my command line as being undefined)
However, in my .rb script under step_definitions folder, I have the following:
Given (/^I am on the Store Homepage$/) do
**CONTENT-HERE**
end
When (/^I click on the Mobile Phones roundel link$/) do
**CONTENT-HERE**
end
When (/^I select a "Apple" "Iphone 6s"$/) do
**CONTENT-HERE**
end
When (/^I select the "1GB+AYCE min" price plan$/) do
**CONTENT-HERE**
end
Then (/^I can complete my order$/) do
**CONTENT-HERE**
end
I'm not sure why this cucumber script is missing out a step, but it's infuriating me to no end. Can anyone help?
EDIT: Off the back of that, if anyone can also answer why it's not showing me the snippets that it's expecting, that'd be great.
You should not be creating a step for each plan.
When (/^I select the "([^"]*)" price plan$/) do |plan|
case plan
when "1GB+AYCE min"
# do something
end
end
You're getting a missing step-def error because your regex isn't matching your text.
What you want is:
When (/^I select the "1GB\+AYCE min" price plan$/) do
Which will match the literal character + rather than B one or more times.
Remember, ruby-cucumber uses regular expression syntax rather than literal strings to match step-defs.
I am using crystal report 2008, i have a report and that has a input field called "Departure_no".
In this input field we can type maximum of four departure_no (Eg: 2345,234,2345,23456), if it exceeds this limit(more than 4 numbers-can count with 3 commas(,)), this input field should not allow to type further.
Is there any way to achieve this by formula or something else by crystal report??
Thanks in advance!!
Priya
try below
use alerts to show the message: I am showing on a database field
Go to Report--> Alert --> Create or modify alert
When a window is opened provide the following:
required name
Required message
Condtion when alert need to be displayed
You can give condition as
if Length(databasefield)> 4 //you need only 4 chars hence this condition
then true
else false
Click ok.
Now you will get message
Let me know of you are looking for something different
I am building a report which shows a list of users that are out of compliance due to not meeting a training deadline.
The queries that show and filter the data have been built and I have verified the correct information is showing in my list.
I now want to add some "action items" to the grid. The first item I am working on is a "Hyperlink Button" that will launch an email to the out-of-compliance user. The email should be addressed to this user, have a hard coded subject, and contain a body that has hard coded text with some data points from the query.
The "List Column Body" for the button column has its "Source Type" property set to "Report Expression"
Expression:
'mailto:'+ [ExceptionsByOrgQuery].[Email] + '?subject=Compliance%20Exception&body=Hello%20' + [ExceptionsByOrgQuery].[Full Name - First Last] + '%2C%0D%0A%0D%0AYou%20are%20overdue%20for%20training.%20%20Please%20complete%20the%20following%20training%20as%20soon%20as%20possible.%0D%0ATraining%20course%3A%20' + [ExceptionsByOrgQuery].[Activity Name] + '%0D%0ADue%20Date%3A%20' + [ExceptionsByOrgQuery].[Date]
All the variables that are used to build the link are in the query and should be matching up to the items for that row, correct?
For some reason I am getting an error when trying to validate this report.
The error I receive is:
RSV-VAL-0032 The following expression is not valid:...expression here... If the item exists in a query but is not referenced in the layout, add it to a property list. CRX-API-0005 An error ocurred at or near the position '11'. The variable named 'ExceptionsByOrgQuery].[Email]' is invalid.
I'm more unsure what the first part of the error means. The email variable is not shown in the grid, but it is part of the query. I can add it to the grid and verify that it is in the query, but I do not want that value to display in the report (nor do I want the variable [Full Name - First Last] to be displayed; it's just for the greeting in the email).
ADDITIONAL INFORMATION:
The List is populating from a query called [ReportQuery]
It contains the following data items.
[Name] <- [Compliance].[Employee].[Last Name] + ', ' +[Compliance].[Employee].[First Name]
[Organization] <- set([Dimensional View].[Organization].[Organizations] -> ?org?)
[Registration Status] <- [Compliance].[Fact Organization Due Exception].[Registration Status]
[Title] <- [Compliance].[Employee].[Title]
[Activity Name] <- [Compliance].[Activity].[Activity Name]
[Due Date] <- [Compliance].[Time].[Date_US]
[Email] <- [Compliance].[Employee].[Email]
[Name - First Last] <- [Compliance].[Employee].[First Name] + ' ' +[Compliance].[Employee].[Last Name]
(the first item is the label and the second portion is expression that is used to make the data item)
EDIT 1 (from melee's suggestions):
I've attempted the method you describe, but am now seeing this error: RSV-VAL-0032 The following expression is not valid: ''. If the item exists in a query but is not referenced in the layout, add it to a property list. CRX-API-0005 An error ocurred at or near the position '21'. The variable named '[ReportQuery].[Email]' is invalid.
I did a query regarding this error and saw that that the List object needed to have the properties that I used in the mailto in a "Properties" property. Defining this property allowed me to select items from the query. I did this with mailto, but it appears to be not matching up values to the correct row; ie. I've set the subject argument on the mailto to be the user's name ([ReportQuery].[Name]) and it doesn't match up with what is shown on the row in the table.
Ok, so you're going to need to follow these steps to get this to work properly - your syntax, concatenation, and everything else looks great - just a little tweaking of the process and you'll be good to go.
Drag an HTML item into a list report.
Select it - under the properties pane, change "Source Type" to "Report Expression" (defaults to Text, which is of no use to us right now)
Double click the HTML item and create the mailto anchor You can use your code sample, but make sure it is validating correctly before closing. it should, at its simplest, look something like: '<a href="mailto' + [Data Item] + '">' - important; do not close the anchor tag at this point.
Unlock the report (padlock on the top)
Add another HTML item to the cell (it will look like there's two HTML items in the same column) and set it to "Report Expression"
Double click the HTML item and add static text/close the tag. For example: Email Me</a>
Run the report and you should have links that you can click (tested as working on 8.4.1)