How Do I Build a Mailto Hyperlink Column in a Cognos Report? - reporting

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)

Related

Google Sheets getting Invalid error in drop down but item is on the list

In Google Sheets, I created a data validation cell to select different time slots. I am getting an error when choosing 6:00, 7:00, 8:00, 9:00 even tho all of them are in the list. Error says: "Invalid: Input must be an item on the specified list"
Added the data validation like this:
Thanks a lot in advance!
The file is here: https://docs.google.com/spreadsheets/d/1NSBx87sWScwe2Vtp9FOcH3BupvPJ_jzISUeAk6gSBOM/edit#gid=612415402
Make sure to actually pick a choice on the dropdown OR your input is exactly the same with the choice.
By default, when you manually enter 6:00-9:00 it automatically adds 0 in the beginning as sheets has detected your input as time.
So you should update your data validation list to use 06:00-09:00 instead so it matches when sheets adjusts your input when they are manually entered.

WebEdit and List Combo field Automation using UFT

Hi I am trying to Automate the input field for searching the equity on the website "https://www.nseindia.com/" using UFT. I am able to set value in the WebEdit field but I am not able to submit using UFT
Below is the descriptive code :
Set Obrowser = Browser("name:=NSE - National Stock Exchange of India Ltd\.")
Set oPage = Obrowser.Page("title:=NSE - National Stock Exchange of India Ltd\.")
oPage.WebList("html id:=QuoteSearch").Select "Equity"
oPage.WebEdit("name:=companyED","index:=0").Set "SBIN"
oPage.WebEdit("name:=companyED","index:=0").Submit
enter code here
Image of the field which is highlighted
Could you please help me in handling this type of input box which is shown in screenshot
I see that when you set a value in the search field we get a list of matching results. If you click on the appropriate result the search is performed.
Instead of submit try the following:
oPage.WebElement("html id:=ajax_response").Link("text:=.*SBIN.*").Click
This assumes there is only one match (you can fine-tune it if there are more).
Explanation:
We first look for the list of results that fit the search term (this is in a SPAN with id=ajax_response). Then, under that, we look for the Link that we want to click on. In this case there's only one match so the description doesn't really matter.

Automator: Choose from list and getting the corresponding variable value

I'm new to AppleScript but I do have some basic knowledge of Automator. Here is what I want to achieve:
There is a simple list of URLs that I often use throughout my work. Like this:
Product datasheet: URL1
Licensing: URL2
Price list: URL3
...
etc.
In most cases I use these URLs when sending a mail message to a customer, but sometimes I also use them in other applications, like Safari. So the service should be global.
I need the service to prompt me with a list of items where each item is the name of a link (like {"Datasheet", "Price list", "Licensing", etc} ).
When I select an item and click OK, the service must fetch the URL that corresponds to that link name and then put it in the clipboard, so that I can paste it whenever I need to use it.
I followed recommendations in this q&a Automator: How do I use the Choose from List action? and created the first action (Run AppleScript). Also, i created a number of variables and specified names and URLs. I.e. I'm going to store the actual list ("database") in the service. There are somewhere between 30 and 50 links/records in total so I don't probably need an external Excel file or something.
What I can't figure out is how to get/fetch the URL from the variable. The Get Value of Variable doesn't work for me because it requires a constant variable name as input. However, I need an action to receive input from the Run AppleScript action, lookup the variables list and fetch the URL and then pass the resulting URL onto the Clipboard action.
Thank you for your help.
Make an automator service workflow with a single Run AppleScript action, containing the following code:
set x to item 1 of (choose from list {"Product datasheet", "Licensing", "Price list"})
if x is "Product datasheet" then
set the clipboard to "URL"
else if x is "Licensing" then
set the clipboard to "Another URL"
else if x is "Price list" then
set the clipboard to "Yet Another URL"
end if
To add to this, add to the list of items on the first line, copy the else if line and edit it to check for the newly added item, then copy the set the clipboard line and edit it so that it contains the new URL.
Also, make sure that you set the workflow to work in "any application" and you should also set it to receive "no input".

Best practice to show custom fields on dynpro?

I am assigned to implement new custom fields. The possible entries have to be selected from a value table. The value table holds the key and a explaning text. The dynpro is build like that:
Input for new field (zzfield) | Output-only field for explaining text. (zzfield_text)
What I want my dynpro to do:
a) Show text in output field based on entered key
b) Update text after ENTER/SAVE from user
c) Update text directly after a new key has been selected from the value table
My current solution is this:
" in the dynpro
PROCESS BEFORE OUTPUT.
MODULE GET_ZZFIELD_TEXT.
" in the module
DATA: zzfield_text TYPE string.
SELECT SINGLE text
FROM value_table
INTO zzfield_text
WHERE zzfield = mara-zzfield.
This works well for the cases a) and b) I have listed above. However, beeing in a PBO, it does not work for case c). My colleage suggested to use something like this:
" in the dynpro
PROCESS AFTER INPUT.
field: zzfield MODULE get_zzfield_text_pai ON REQUEST.
I can not duplicate my code in the module get_zzfield_text_pai, because the of the DATA declaration of zzfield_text. It is reported to be unknown in the PAI (besides it is already defined in the PBO module) but it is also reported to be duplicated if I declare it again in the PAI. Further, I dont know how to implement new global fields into my function group. Using another include creates again issues of that zzfield_text beeing unknown.
In general, I am not happy about my solution and would be very thankfull for each suggestion about how to code this feature.

openoffice calc macro access current selection of a validation list

i have an openoffice dropdown select using list validation.
the problem is, that the list contains duplicate entries in a flat tree form - like:
Test 1
Subtest
Test 2
Subtest
Now i would like to Convert the selected values to something like "Test 1 - Subtest", "Test 2 - Subtest" etc.
Is there a simple way to do this with an OpenOffice Macro? Or is there at least a way to get the Position of the currently selected Element for a cell.Validation ?
There should be a 'Unique' option that could be activated for not allowing repetitions.

Resources