how to send emails to users in data type in PEGA - pega

i have a data table with employee info namely id, name, company, salary and emailaddress. i want to send emails to employees with salary greater than an amount using an activty. please help me with steps.
I have tries obj browse with select salary>amount-> then loop through embedded pages and then tried to property-set .emailid(property to store emailid from table) = pxresult().emailaddress. But the problem is pxresult(x) contain only salary property because of select condition, I don't know how to get the emailid property from table.
Help is very much appreciated.

In the Obj-Browse method you can add all properties. You can include emailaddress property as well.
Check below example
Now you can do pxresult().Email property.

Related

MS Access Query matching month from two date fields

I'm new to Access and am trying to figure out the best way to write a query. I have a table that tracks security entry information for each employee which has an Employee ID field and a date field [ENTRYDATE]. Another table (tblSPACE) lists out where that employee sits and is updated each month with new information. There is a field in tblSPACE which tracks what month the information is from. [ASOFMONTHYEAR]. These two tables are related by a unique employee ID number. What I want to do is have a query that shows the entry information and the corresponding seat that that employee was in for that month. I'm thinking I need to add a criteria into one of the date fields to have it match the month of the other date field? Something like Where Month(tblSpace.ASOFMONTHYEAR) = Month(tblEntry.ENTRYDATE). But of course that doesn't work. Any guidance on how I should go about this? Sorry if I've not explained this well.

SQL Server : sum of 2 columns in each row display

I am using SQL Server. I have 2 columns Passed students and Failed Students in my database.
How to write a query which displays both these columns along with a third column which is Total Students which displays the sum of the entries in the row?
EDIT
It is not allowing me to ask another question.So,posting it here:
I have a hyperlink field in my gridview as below:
[Please refer comment for the code.For some reason it doesn't get posted here.]
Its basically a runId.When I click on this hyperlink I am redirected to a page called RunAnalysis.I want to access the value of the runId which was clicked in this page.
I was thinking of using query string but there is no event as far as I know that is fired on click of the hyperlink.
My question is how do I access the runId value in this page ? Can someone tell me if some event is fired so that I can send a query string.
Thanks.
You haven't given a lot of background information so I am assuming many things in my response.
Here is a simple aggregated result set:
SELECT SUM(Passed) AS [Passed],SUM(Failed) AS [Failed],COUNT(*) AS [TotalStudents]
FROM dbo.Students
Now if there is some grouping you want to do then you would add a GROUP BY clause like so...
I'm creating a new column because I don't know your schema:
SELECT GradeLevel, SUM(Passed) AS [Passed],SUM(Failed) AS [Failed],COUNT(*) AS [TotalStudents]
FROM dbo.Students
GROUP BY GradeLevel
ORDER BY GradeLevel

Jdeveloper query form

I'm trying to create an adf query panel with table but I need to limit the search values as also the result values in the table.
For example:
- I have a table with FName, LName, Dateofbirth, address, phone
- I want that the values presented in the search form are FName, Lname
- the values in the result table Fname, Lname, address, phone
I've checked several links including this one enter link description here
But I can't understand how to limit the values.
There are lot of resources available on the internet on how to implement search functionality in ADF. here are few for your reference:
http://www.baigzeeshan.com/2010/04/creating-simple-search-form-in-oracle.html
https://www.youtube.com/watch?v=LAWSfO-7xR8
http://adfnote.blogspot.com/2013/02/create-simple-search-form-in-oracle-adf.html
Normally a search functionality is implemented using a View Critreia, which is created on a View Object. It shows up in Data Control as a Named Criteria under your View Object instance.
While creating the view criteria you can specify the items that you would want to see in the panel as search fields.
When you use (drag and drop) your view criteria as an 'ADF Query Panel with Table' on a page, you get the option to specify the columns you want to see in the results table. You can restrict the number of columns there, or even afterwards by just removing the unwanted columns from your page.
I was able to make it work, by not checking the attribute option 'Queryable'.
This way the it does not appear in the query form,only in the results table.
Thank you all for your help

ASP.NET MVC2 CategoryTree Routing

I have in SQL DB table:
Categories:
int CategoryID
int ParentID
string Name
I want make link somelike this : localhost://(Name)/(Name)/(Name) and the last (Name) is selected category.
Real example: localhost://Sports/Vodni-Polo/Balls
Problem: in DB is name of category Vodni-Polo is Vodní pólo. On link creating i translate name to SEO link shape (Vodni-Polo).
How i can get category id wihout sending extra get parametr (Sports/Vodni-Polo/Balls/?categoryId).
I get Full tree of category from DB all time, but i must know witch items i can display it.
What i want: If i click at category, send GET req.(localhost://Sports/Vodni-Polo/Balls) a from this i want know whot id have (Balls)
You can make the Name a Unique key so you can query by it and guarantee uniqueness. Alternatively a common solution is to do something like {controller}/{action}/{Name}-{Id}

Coding practice: how to avoid hard coding?

I have a table in the database that store 4 category and the structure of the table is ID (GUID), description. I load the category into a dropdown list (asp.net webform) to allow people to select a category and based on what they selected. I'll then display info associated with their selection and hide the others.
Currently, i do a "select case" based on the GUID that i hard coded in code behind to display the associated info. Is there a better way to do this without hard code in GUID on the code behind?
What is the Data that's associated with the Guid/Description...
The data you've hardcoded sound's like a candidate for being added to the database itself.
If it's one piece of information per Category/Guid, then consider extending your Database Table to store that info to.
If it's multiple piece of information per Category/Guid, then consider creating a new Table With a CategoryID on it, and a foreign key relationship between your Category Table and your ExtraInfo table
You could query the database for the GUIDs when the app starts and cache them in a static Dictionary.
you could store the GUID in your web-config and load it at run time. then, you can easily replace that GUID with another w/o having to recompile.
You should have a Categories table and a Posts table (or whatever it is that you will tag with your categories). In the Posts table you have a column for the CategoryID (assuming each post can only belong to one category), so that you only have the category name in one place (normalize your data).
When you render the dropdownlist, you select the GUID:s from the database. No hard coding, and if you add another category (or remove one) the dropdownlist will automatically reflect the available categories.
If you bind the dropdown list to the Category row or a Tuple that contains the category name and the value you can load the Guid in your codebehind using the SelectedValue property. You will then set the DataTextField and DataValueField on the Dropdownlist.

Resources