I have setup a HTTPS request to SharePoint action in PowerAutomate, Using the Uri _api/SP.Utilities.Utility.SendEmail
In the Body, I have 'To': ['myemail#email.com','friendemail#email.com'], along with the rest
In this case the request works and we both receive the email.
However if this changes to ['myemail#email.com','anotherfriendsemail#email.com'] then I receive the email both the other friend does not nor are they listed in the emails To field.
myself and my friend are both owners of the SharePoint site and all parties are part of the same business. The other friend is not a member of the SP site though I tried adding them as an member and then owner and neither worked.
Why does this send to just myself and my friend but not to the other address?
The Error mesage is:
{ "status": 400, "message": "{\"odata.error\":{\"code\":\"-2130242040,Microsoft.SharePoint.SPException\",\"message\":{\"lang\":\"en-US\",\"value\":\"The e-mail message cannot be sent. Make sure the e-mail has a valid recipient.\"}}}\r\nclientRequestId: RecipientID\r\nserviceRequestId: RequestID", "source": "https://hwinc.sharepoint.com/sites/SiteName/_api/SP.Utilities.Utility.SendEmail", "errors": []}
Edit: Full Body Below
Method: Post
Uri: _api/SP.Utilities.Utility.SendEmail
Headers: accept application/json;odata=nometadata
content-type application/json;odata=nometadatae
Body: {
'properties':{
'From': 'Sharpoint_Site_Name#hwinc.onmicrosoft.com',
'To': ['FirstName.LastName#company.com.au','ABC_Sector#company.com.au'],
'Body': '<p>The Following Order has been Approved:<br><br></p>
<table>
<tr> <td>Approver:</td> <td>#{outputs('Start_and_wait_for_an_approval')?['body/responder/displayName']}</td> </tr>
<tr><td>Date of Order:</td><td>#{outputs('Get_response_details')?['body/rfe2e26ab18544ebea75d9b17a5d84af1']}</td></tr>
<tr> <td>Company:</td> <td>#{outputs('Get_response_details')?['body/rcd9f1c32a2364690ae6d6dbbb049a306']}</td> </tr>
<tr> <td>Customer Name:</td> <td>#{outputs('Get_response_details')?['body/r8a29c2d61ac54342a77d1604bd9f796e']}</td> </tr>
<tr> <td>Address:</td> <td>#{outputs('Get_response_details')?['body/r343a56a5c4ac4f55b11e37c5c3a3f0d4']}</td> </tr>
<tr> <td>Estimated Qty:</td> <td>#{outputs('Get_response_details')?['body/r8a28c14eddca4884833443357035c7eb']}</td> </tr>
<tr> <td>Required Mix:</td> <td>#{outputs('Get_response_details')?['body/r2b9c2f804efe49509436a2c44afe4a83']}</td> </tr>
<tr> <td>Boral Plant Name:</td> <td>#{outputs('Get_response_details')?['body/rcc43d77ecc6f4083ac6d3fbf59ffee75']}</td> </tr>
<tr> <td>Plant Code</td> <td>#{outputs('Get_response_details')?['body/r4fd7f3aceb164a67baece47df43933ee']}</td> </tr>
<tr> <td>3rd Party Supplier:</td> <td>#{variables('3rd Party')}</td> </tr>
<tr> <td>Price:</td> <td>#{outputs('Format_Final_Price')?['body']}</td> </tr>
</table>
<p>Kind regards</p>
#{outputs('Start_and_wait_for_an_approval')?['body/responder/displayName']}',
'Subject': 'Urgent! 3rd Party Purchase Order Request'
}
}
Related
I've installed MRTG, added some options and customizing of mrtg.cfg. Interface speed is 1 Gb/s. I wanted to show the graph and data in bits, not bytes. I ended up with graphs as example show 8Mb/s rather than 80 Mb/s. Where is the mistake in my mrtg.cfg?
Target[10.0.1.1_7]: 7:public#10.0.1.1:
YLegend[10.0.1.1_7]: Bits per Second
Colours[10.0.1.1_7]: GREEN#00eb0c,BLUE#1000ff,DARK GREEN#006600,VIOLET#ff00ff
Background[10.0.1.1_7]: #a0a0a0a
Kilo[10.0.1.1_7]: 1024
SetEnv[10.0.1.1_7]: MRTG_INT_IP="a.b.c.d" MRTG_INT_DESCR="eth1"
MaxBytes[10.0.1.1_7]: 125000000
Title[10.0.1.1_7]: WAN -- Oslo
PageTop[10.0.1.1_7]: <h1>WAN -- OSL</h1>
<div id="sysdetails">
<table>
<tr>
<td>System:</td>
<td>Cisco RV320 OSL </td>
</tr>
<tr>
<td>Maintainer:</td>
<td></td>
</tr>
<tr>
<td>Description:</td>
<td>eth1 </td>
</tr>
<tr>
<td>ifType:</td>
<td>ethernetCsmacd (6)</td>
</tr>
<tr>
<td>ifName:</td>
<td>eth1</td>
</tr>
<tr>
<td>Max Speed:</td>
<td>1000 Mbit/s</td>
</tr>
<tr>
<td>Ip:</td>
<td>a.b.c.d (No DNS name)</td>
</tr>
</table>
</div>
I also added following options:
options[_]: growright,bits,transparent,nobanner,nolegend
The answer was actually in the way mrtg.cfg was read and my understanding. MRTG by default during CFGMAKER creates new line of options and create the RunAsDaemon at the bottom of the mrtg.cfg.
Then I came upon this text: The later setting replaces the previous one for the rest of the configuration file
This means it run as default through the config file, and then changes when reading my values at the end.
Solution: All global settings need to be above SNMP/interface/etc settings to be valid.
I am new in ASP.NET MVC. There are 2 tables in my database named "tbl_Project" and "tbl_Note". Each project can have one or more notes, so I keep/save the "ProjectID" variable in the "tbl_Note".
What I want to do: On the page where the project list is located, I want to show the total number of notes for each project. I tried a few things but I've fail.
This is my projects list page:
#if(Model.Any())
{
<table class="table table-striped table-hover table-bordered" id="sample_editable_1">
<thead>
<tr>
<th>Total Note</th>
<th>Project Name</th>
<th>Contract Start Date</th>
<th>Contract End Date</th>
</tr>
</thead>
#foreach (var item in Model)
{
<tbody>
<tr>
<td>
<!-- Total number of notes will come here -->
</td>
<td>
<p>#item.ProjectName</p>
</td>
<td>
#item.ContractStartDate.Value.ToString("dd.MM.yyyy");
</td>
<td>
#item.ContractEndDate.Value.ToString("dd.MM.yyyy");
</td>
</tr>
</tbody>
}
</table>
}
else
{
<p>Project is not available!</p>
}
I've try something like this but it's not working:
#if(item.tbl_Note != null)
{
if(item.tbl_Note.ProjectID == Model.ProjectID)
{
#Model.Sum(b => b.tbl_Note.ProjectID.Count)
}
}
This line gives an error: item.tbl_Note.ProjectID and the error is: 'ICollection' does not contain a definition for 'ProjectID and no extension method 'ProjectID' accepting a first argument of type 'ICollection' could be found.
How can I calculate the total number of notes? And if there is any other code block you want to insert, please tell me.
According to the error, item.tbl_Note is of type ICollection<T> and you are looking for a ProjectID property in it.
Change it to:
#if(item.tbl_Note != null)
{
#item.tbl_Note.Count
}
The person I'm designing this app for requested that she be able to make a email list of people with birthdays within the next 7 days. One of the fields in the collection is Bdate in the format 'YYYY-MM-DD'. I decided to make a registerHelper with a simple algorithm that determines if the birthdate is one that fit the request:
Template.registerHelper('calculateBirthday', function(bdate) {
var birthDate = new Date(bdate);
var current = new Date();
var diff = current - birthDate; // Difference in milliseconds
var sevenDayDiff = Math.ceil(diff/31557600000) - (diff/31557600000);
if (sevenDayDiff <= 0.01995183087435)
return date;
else
return false;
});
The template would have a table that lists the birthdates that are the ones to get for the email list:
<table class="bordered">
<thead>
<tr>
<th>Name</th>
<th>Birthday</th>
</tr>
</thead>
<tbody>
{{#each QueryBirthday}}
<tr>
<tr>{{FullName}}</tr>
<td>{{calculateBirthday Bdate}}</td>
</tr>
{{/each}}
</tbody>
</table>
The problem with this is that it prints all the names with mostly blank birthdates. The algorithm works fine, but how to tell Meteor to only include those names and birthdates that 'should' be on the list?
The quickest way to hide unwanted items is
<table class="bordered">
<thead>
<tr>
<th>Name</th>
<th>Birthday</th>
</tr>
</thead>
<tbody>
{{#each QueryBirthday}}
{{#if calculateBirthday Bdate}}
<tr>
<td>{{FullName}}</td>
<td>{{calculateBirthday Bdate}}</td>
</tr>
{{/if}}
{{/each}}
</tbody>
</table>
I don't know how your application works, but like other people who commented on your question, I would filter and send only the required results from server to client.
I used SQlite database.
I wrote code like this
Module:
db.py
db = DAL('sqlite://storage.sqlite')
db.define_table('data3')
db.data3.import_from_csv_file(open('mypath/test.csv'),'r')
Controller:
def website_list():
return dict(websites = db().select(db.data4.ALL))
View:
{{extend 'layout.html'}}
<h2>List Of Websites</h2>
<table class="flakes-table" style="width:100% ;">
<thead>
<tr>
<td class="id" >ID</a></td>
<td class="link" >Link</td>
</tr>
</thead>
{{for web in websites:}}
<tbody class="list">
<tr>
<td >{{=web.id}}</td>
<td >{{=web.Link}</td>
</tr>{{pass}}
</tbody>
</table>
But it is showing error as
"type 'exceptions.AttributeError'"
Also error has this line
Function argument list
(self=, key='data3')
I think some thing is wrong in reading csv file. My csv file has following data
"Link_Title","Link"
"Apple's Ad Blockers Rile Publishers","somelink"
"Uber Valued at More Than $50 Billion","somelink"
"England to Roll Out Tailored Billboards","somelink"
Can anyone help in this..?
i am trying to develop a web application using razor view engine. It is an vacation request management system where users log onto the web site and submit vacation requests through a web form. All requests are stored in a database table called "LeaveRequests". At the moment i am trying to alter a page so when a user is logged in all the vacation requests they made are displayed on the web page in a table view. the code shown below works fine to display 1 request made by a user but i need to alter it to display all requests made by the user. i have tried using a foreach statement but keep getting errors whatever i try , can anyone point my in the right direction and tell me how i need to alter my code to achieve what i want ?
var db = Database.Open("Annual Leave System");
var dbCommand2 = "SELECT * FROM LeaveRequests WHERE email = #0";
var row2 = db.QuerySingle(dbCommand2, theEmail);
if(row2 != null) {
description = row2.description;
theLeaveType = row2.leaveType;
startDate = row2.startDate;
endDate = row2.endDate;
shortStartDate = startDate.ToString("dd-MMMM-yyyy");
shortEndDate = endDate.ToString("dd-MMMM-yyyy");
inttotalDays = row2.totalDays;
requestStatus = row2.requestStatus;
}
<fieldset>
<legend>Employee Leave Request Details</legend>
<table border="1" width="100%">
<tr bgcolor="grey">
<th>Description</th>
<th>Leave Type</th>
<th>Start Date</th>
<th>End Date</th>
<th>Total days leave requested</th>
<th>Request Status</th>
</tr>
<tr>
<th>#description</th>
<th>#theLeaveType</th>
<th>#shortStartDate</th>
<th>#shortEndDate</th>
<th>#inttotalDays</th>
<th>#requestStatus</th>
</tr>
</table>
</fieldset>
The QuerySingle method will only return one row. You need to use the Query method to get all rows.
var rows = db.Query(dbCommand2, theEmail);
Then in the HTML part of the file:
<fieldset>
<legend>Employee Leave Request Details</legend>
<table border="1" width="100%">
<tr bgcolor="grey">
<th>Description</th>
<th>Leave Type</th>
<th>Start Date</th>
<th>End Date</th>
<th>Total days leave requested</th>
<th>Request Status</th>
</tr>
#foreach(var row in rows){
<tr>
<td>#row.description</td>
<td>#row.leaveType</td>
<td>#row.startDate.ToString("dd-MMMM-yyyy")</td>
<td>#row.endDate.ToString("dd-MMMM-yyyy")</td>
<td>#row.totalDays</td>
<td>#row.requestStatus;</td>
</tr>
}
</table>
More information here:
http://www.mikesdotnetting.com/Article/214/How-To-Check-If-A-Query-Returns-Data-In-ASP.NET-Web-Pages
http://www.asp.net/web-pages/tutorials/data/5-working-with-data