Adding multiple lines of collection text to an email - c#

I currently have a collection that can have between 2-4 rows and I am trying to attach these rows to an email body.
However, when I am using the 'Email Notifications' Business Object and the 'Notifications-Send Email' action, it only enters the first row and ignores the rest.
I have attached screenshots below of my process
How can I make it so it enters all rows in the email? If there is a code stage way possible I am open to that also

To add this collection to the email you need to first change it to string, that can be added to email. The way you've built it, you're only adding a value from one cell - the one from that column and current row.
There is no official Utility action that can change collection to text. Closest one I can find is action "Get Collection as CSV" from object "Utility - Strings", but the output is not user friendly.
The other way is to loop through collection [Emails Not Sent] and join the data from collection to a text data item. Afterwards you can use that data item in the email that you're sending.
Finally, I'd like to suggest for you, to send emails using HTML mode. There are numerous advantages to that - you can use html formatting, hyperlinks, tables. It is be also pretty straightforward to create an action, that will output a nicely looking html table ready to be added to body of the email you're sending.

Related

How to bind a SharePoint list attachment to a Kendo Grid column dynamically

I have a SharePoint list where I grab the required rows depending on a dynamically created query, and passing them to the front end using a Json serialized object. I am then using that Json object as the dataSource for Kendo Grid.
Now, some of the rows that I'm pulling are going to have a file attached to them. I want to check if a row has an attachment. And if it has one, I want to place an image (with a link to the attachment) to the corresponding column. The column is static, its going to be there even if there aren't attachments on the list.
How can I check if an item in that Json object has a value in its attachment, and if it does, how do I use that information on the column template?
I can provide additional details if required. Thanks in advance!
Note that the schema.data configuration can accept a function, so you can parse the information that comes from the server before you bind it to the widget:
Schema.parse
And in the Kendo UI Templates, you can execute fully functional JavaScript, so you can implement a simple if statement:
Templates

Is two data sources for a DataGridView.ComboBoxColumn possible?

I have a DataGridView with several TextBoxColumns and one ComboBox column called 'combo' that holds the client type. The problem is that I'd like to show both the currently selected client-type value along with the dropdown client-type list to validate future changes by the user. In SQL Server, I have a DB with two table columns, 'client_type_dropdown.name' and 'clients.client_type'. The 'client_type_dropdown.name' column is a validation list. The 'clients.client_type' column contains the current client type for clients in the database. Is there a way to show in 'combo' both 'client_type_dropdown.name' and 'clients.client_type' , i.e., one source for the ComboBoxColumn dropdown and a different source for the textbox part of 'combo'? Or do I need to have two columns in my grid?
I appreciate your help.
I'm using a third party grid, but I usually handle this by setting the combo drop down style to DropDown instead of DropDownList. This will allow your original database value to display, even if it isn't in the list.
This also allows free typing of values into the combo field, so the trick after that is to validate the user input to make sure it matches a value in the list before you allow them to save updated values. You could play around with the LimitToList property of the combo to possibly save you doing the validation manually, but with most controls I have worked with it will give you more grief than help.

How to generate freeform rdlc reports with one page per row

Given a data set containing multiple rows, from within a .NET console application I need to generate a report on a single page for each row, sending those pages directly to the printer.
I am attempting to use Microsoft Report for this by attaching it to a data set and placing TextBoxes where I wish. Generating the report and sending it to the printer are not a problem. Unfortunately, the data only seems to be available in aggregates -- First, Sum, Last, Max, etc. I cannot latch the text box to a bare field.
Some poking around here and other sites seems to address this, but only when the data is presented in a table. One post even said without elaboration, "My mistake was using Text Boxes"
Am I using the wrong tool for what I am attempting to accomplish?
I ran into the same problem and managed to solve it. The solution seems a little convoluted to me so don't quote me on the "right" way to do this, but here is what I did:
Make sure you have a Dataset defined for your report.
Add a "Table" control to the report. This seems to be needed in order to iterate the rows in your Dataset.
Delete the header row and two of the default columns from the table so that you are left with a single row with a single column.
Expand the table to the width of your layout and make it as tall as you will need for your "free form" layout.
By default, there is a TextBox inside the table cell. Right-click the empty table cell and choose "delete" to remove that TextBox.
Drag a "Rectangle" control into the empty table cell. It seems to automatically "dock" to the width/height of the table cell.
Now you should be able to drag the fields from your DataSet (TextBoxes, etc) into the Rectangle to produce the desired layout.
Note that I am in the early stages of using this approach so I'm not sure if I am going to hit any walls... but for a basic report that uses TextBoxes and a page break after each "row" it seems to be working ok.
Or you try to use a list.
In the list you can arange textboxes (and other controls) as you want and they will be filled for each record in the recordset.
This work for me. :-)

how to track only the changed values in the repeater asp.net

I have a editable nested repeater containing the data.I use it for showing the data and also for saving the data which is updated by the user.
I want to detect particular cell/row for which the data has been modified by the user so that I can update only that particular row in the database instead of saving all the data again.
Is there a way to work this out.Which would be the best technique to use ,Javascript or server side code ?
Resource country etc | Week1 Week2 Week3 | Total
ABC XYZ 10 15 20 45
This is the repeater structure.
Middle one (Weeks showing hours worked by resource which is editable) is the nested repeater.
Values can only be changed in the nested repeater.
I maintain unique ID's for each resource in the hidden field.
Can you suggest me some ways to achieve this functionlity ?
This is normally handled by your ORM, but you can implement it yourself if you like. The idea is called 'change tracking', and basically what's commonly done is to retrieve the record from the database, then compare known retrieve values to the new values before saving it again.
Depending on your concurrency strategy, you also might use a hash of the original values that were sent to the client, placed in a hidden field perhaps, which you can then check original vs. currently in the database in order to not accidentally overwrite someone else's changes.

Showing records on grid efficiently

i have a third component grid that i am using on my page.
It displays 20 records in one page.
Also i am using images to display certain columns.
Like comments , attachements have clickable images for every row.
the problem is.. everytime i load my page.. the logic right now is.. it goes in the database.. checks for every row in the table to see if the comments are added or is there attachment.. and accordingly disables or enable the image of that particular record(row)
Now this takes too many database hits and processing time increases.
Can u tell me any other way to do this.?
You could add a column "Number of comments" and "Number of attachments" to your rows.
You should enable some sort of VirtualMode in your grid ( every grid should have this function in some way ) in order to feed just the item the user actually see. This is a good practice always.
Irrespective of grid, you can build some sort of object which collectively holds the textual information that you need to show and some more flags which tell you about the image and attachment. You bind the collection of this custom object to your grid.
Use the flags in this object to put different images in your columns.
HTH

Categories