How schedule Cognos to send one report to both the static email list plus query results email list as recipients - cognos

I want to schedule an outgoing Cognos 10 report to be emailed to a changing list of email addresses which change according to a Query results plus 3 static email addresses that do not change.
(Originally I bursted and used a join to join in static recipients, but the requestor does not want to receive bursted reports. But they only want one report to be sent to everyone on that days query result plus static cc list.)
For example today the report may be emailed to:
mailto: new_email_addr1, new_email_addr2
cc: static_addr1, static_addr2, static_addr3
Tomorrow perhaps changes to:
mailto: new_email_addr8, new_email_addr13, new_email_addr2
cc: static_addr1, static_addr2, static_addr3
Notice, cc email address stay the same.
Only 1 email should go out to each recipient each day and will include all results, thus not a bursted report in the usual way I understand it. All recipients receive identical report.
Thanks for any help/suggestions.
Side thought: Would it just be a matter of changing the joined email query result to link to itself in the Burst options? ie. one query containing static email plus query result addresses joined to itself in Master Relationship detail? Just throwing this out there.

You can still use bursting. Join the bursting query to the report in a way that produces a single report. (ie, Put them all in the same "group".) If needed, you can do this by including in both queries a query item that is defined as a constant. (For example, the data item name may be BurstJoin and its expression may be 'a'.)
If the three static email addresses are not in the source data, you can add them by UNIONing the EmailAddress query with three other queries, each returning a single record for each of the static email addresses.
Since Cognos is so graphical, it's difficult to show here. In SQL, the final query returning the email addresses for bursting may look like...
SELECT 'a' AS BurstJoin
, EmailAddress
FROM TableListingEmailAddresses
UNION SELECT 'a' AS BurstJoin
, 'joe#example.com' AS EmailAddress
UNION SELECT 'a' AS BurstJoin
, 'sally#example.com' AS EmailAddress
UNION SELECT 'a' AS BurstJoin
, 'bob#example.com' AS EmailAddress
Or, maybe, the query (or the column) for the cc list would need to be different? I haven't done bursting with a cc list in a while?

I can see master detail might work if you need multiple queries.
If you can get the result in a single query (because one set is static and never changes)
A data item for the static emails. The other data item for the query based results
Using a comma delimited string for your email addresses, you can just combine data items
Relevant post for sending to multiple addresses
Send Cognos Burst Reporting to multiple emails

Related

How can I check all 15K rows in a SharePoint list using Power Automate flow

I have a SharePoint list that contains approximately 15000 records. My list has an Owner field for each record. There can be many owners of many different records. However, there can be only one owner per record. Each day people access this list and make updates depending on the record. I would like my script to run every evening and send an email to each owner with a list of the records that they own that were modified. So if one or more records that I own are modified, then I want to be notified at the end of the day with an email that has a link to the records that were modified. Similarly, if some records of 5 different owners were modified today, then they would each receive an email listing the records that they own that were modified.
I know how to compare a record's Modified field to today's date using the formatdatetime(utcNow(), 'MM-dd') functions. I'm currently experiencing 2 issues. The get items action in Power Automate relies on the SharePoint REST API and that only return 5000 rows at a time, so my results are missing 10K of rows. So, I need to figure out how to overcome that limitation. Also, I haven't figured out a best way to send out emails to the different record owners displaying only the records that they own. I currently send out a mass email with all the modified records - this is inefficient and not a pleasant experience for those receiving these mass emails.
Any help would be greatly appreciated, even if it includes restructuring or setting up indexes on my list, all responses will be considered.
With a slightly different mind set, you may get a much easier solution.
Create a view that is filtered by Owner = [Me] and sort it by modified, descending.
let people check this view regularly.
People have an obligation to do their job. If they don't do that, it's more a behavioural problem, not a technical one.
Saying that, you don't have to loop through all 15000 records. You only need to loop through the ones that were changed Today. If you get fewer than the threshold changes per day, you could:
Get Items and use the OData filter to filter by Modified = today and sort order by owner
initialise previous owner variable with empty string
loop through the Get Items results
set current owner variable to the item's owner email
if previous owner variable <> current owner variable
start an email and put the list variable in the email body
send the email to the previous owner variable (unless it's still the empty string)
clear the list variable
set the previous owner variable to be = current owner variable
append the item details to the list variable
loop end

MS-Access Automatically updating data based on another table (Email Blacklist)

I'm setting up a brand new database as a lot of the work we do is on multiple spreadsheets and a lot of the data is duplicated. I have a lot of knowledge with Excel, however, I feel that Access would much better suit the needs of the business and data management.
A large role for many in the business is to send emails/follow-up emails based on criteria, however, we use several services to do this and I need a new method of tracking people/businesses who have 'Opted-out' of email updates, we can export the people who opted out from the different applications and put into a spreadsheet.
I had a little play around with relationships to see if this would work, however, kept getting error along the lines of 'invalid for field type' and although I could do this with a simple countif function in Excel I was wondering if it's possible in Access without VBA.
One of the fields we have for our sponsors/delegates table is email address. I want to know if it is possible to create a new form & table or something to do the following:
User loads form, clicks a button and selects spreadsheet with emails in Column A
Data from column A is then imported into a blacklist table
Access removes duplicates and adds the rest to a blacklist table
Access updates sponsor/delegate table field 'opt-out' to yes for any email addresses added to the blacklist table
Edit: Here are 2 screenshots of the separate tables
What I need Access to do is basically tick the box 'opt-out' automatically for all records where the email matches to one in the blacklist
A query to update the opt-out field in your Sponsors table for all records which have a matching email address in the Blacklist table is relatively straightforward, with the matching operation performed by a single inner join, e.g.:
update Sponsors inner join Blacklist on Sponsors.[Email Address] = Blacklist.[Email Address]
set Sponsors.[Opt-Out] = -1

Table with variable number of rows in MS Office mail merge [duplicate]

I'm creating a compliance mailing for my organization, the mailing will include merge fields that identify the office location, physician, and SiteId. The mailing will also include a table of information that is dependent upon the particular SiteId.
I'd like to use the import table function of MS word and set up a query that references a merged field (SiteId) so that the inserted tables populate the appropriate data for the particular site. I'm unable to do this.
How can I set up this document so that I can import only records from my source (an ms access query) that match the SiteId merge field?
Word's mail merge does not support one-to-many relationships. There are ways to coerce it, but only one of them can yield a table as a result and over the years it has become less and less reliable as Microsoft has not regarded it as important enough to maintain...
What you need to do is set up a query that provides ONLY the information you want displayed in the table, plus the key (SiteId). It's best to sort it so that all the SiteId entries list together, and are in the order the data will come through in the mail merge data source.
On the Insert tab go to Text/Quick Parts/Insert Field and select the Database field from the list in the dialog box. Click "Insert Database" and follow the instructions in the dialog box to link in the data. Be sure to set the Query Options to filter on the first SiteId from the data source. When you "Insert Data" make sure to choose the option to "Insert as a field".
This inserts a DATABASE field in the document which you can see by toggling field codes (Alt+F9). The field code can be edited and what you need to do is substitute the literal SiteId value you entered for the query with its corresponding MergeField.
When you execute the merge to a new document that should generate a table for each data record corresponding to the SiteId for the record. But, as I said, Microsoft hasn't done a great job of maintaining this, so it may require quite a bit of tweaking and experimenting.
If the results are not satisfactory then you should give up the idea of mail merge and use automation code to generate and populate the documents.
You can find more (albeit somewhat out-dated) information on this topic at http://homepage.swissonline.ch/cindymeister/mergfaq1.htm

Declarative SharePoint 2013 Workflow Sending Email to Person Specific in Item List Field of Type Person/Group

I've been looking everywhere... for days. (I'm stubborn so I don't like asking questions before trying.) So here is the hardest question ever:
I have a SharePoint Online (2013) Custom List on which I'm running a Workflow. The association shows so the Workflow actually runs, and I receive email from it to one of the hard-wired emails.
The problem is getting an email dynamically, from a Person/Group field in the list. I have a field named ResponsiblePerson. When I try to get the value of that field (all I care about this "Person/Group" is the email), it seems to come as a null or empty string value.
I've tried many different variations to the following:
First I get the item.
Then I get values from the item. I just get ResponsiblePerson and put it in a variable called rp1. I tried to make this variable of type dynamic and string. Both didn't work, as I get an empty value in the email (see next step).
Finally, I send an email.
This email is addresses to a static email for testing. I get an empty rp1 otherwise I would have specified it in the To of the email activity (within a collection) and we would be done.
Use the field name + "Id".
Here is where I blog about this: http://mazdev.blogspot.ae/2014/05/get-value-of-persongroup-list-item.html

Sharepoint HTML Email outputs Junk characters for "Domain\Username" values

I recently created a workflow on Sharepoint 2010, which has a step to shoot out emails to the desired users.
The content of the email body is formatted in HTML and I need the sharepoint to send me the details of the User who creates/changes a particular item.
However, when i receive the email in my Inbox, I see that it is in Domain\Username format, but I also see some junk characters appended to the same.
For Example. I receive the following output for the sharepoint Lookup [Current Item: Requestors] (As String)
11;#DOMAIN\USERNAME1;#9;#DOMAIN\USERNAME2
Could someone help me in letting me know on how to eliminate these junk characters?
Try "As Display Name" instead of "As String" in the Lookup [Current Item: Requestors].
And btw it is not junk. These the IDs of the users :)
Good luck!
Your issue is that you cannot use "As String" as it includes the items IDs and does not include the users email address, username or login information. You need to the use one of the Semicolon Delimited options in order to use this information.
Now, as for "Coercion Failed: Input cannot be null for this coercion." once you make the change, you can not use a delimited option and then have the field be empty. To get around this set the field as required or leave it as a string with the item IDs being shown.
The same issues arise if you want to use the people picker and then use that field to email those users, you have to use "Email Addresses, Semicolon Delimited" and the field must have a user selected or it will run in to the coercion error.

Resources