Jsf display dynamic sql search results in table
i'm making a search results page that will basically mirror the contents of a database table. i dont know what the user will search for so i need to generate the table (rows, columns) dynamically. i've used 3 days on this searching my brains out and have surprisingly not found anything helpful.
example searches:
select * from member
select * from user
select * from invoices
these tables will have completely different columns. what i've done so far is return a Collection<Collection<String>> to my backing bean. the Collection<String> are the rows, i.e. the column values.
i'm not sure now how to create a dynamic table from this. any help would be greatly appreciated. fyi, i have access to richfaces as well.
nickleus wrote:
i'm not sure now how to create a dynamic table from this.You could always try using a JSF data scroller component.
i have access to richfaces as well.Since you have access to Richfaces, try the Richfaces Datascroller component for pagination. Have a look at this link.
example searches:
select * from memberAlso, having a query like this can spell trouble in the long term if your website is an Internet application. Even if it's an Intranet application, it's still bad if you have to display everything from a table like the example you provide. Best practice is to give the users a minimum no of rows initially - say ten - then give them an option to fetch the next ten rows through pagination. You might also need a WHERE clause to restrict the amount of data being queried from the database.
Similar Messages
-
Hi,
We use Refiners that come from Entity Extraction (In the Refinement Web Part i select: WordPartCustomRefiners2, WordPartCustomRefiner4 etc.).
In case i want to display that also in search result hover panel - is it possible?
to set in the hoverpanel display template something like: ctx.currentitem.WordPartCustomRefiner4
keren tsurHi keren,
Here is an article talking about how to display custom managed properties in the hover panel of search results, please check if it is what you are looking for:
http://blogs.technet.com/b/tothesharepoint/archive/2013/09/17/how-to-display-values-from-custom-managed-properties-in-the-hover-panel-in-sharepoint-server-2013.aspx
Regards,
Rebecca Tu
TechNet Community Support -
Display of Spotlight search results
Morning.
How can I enable the Finder to show (a) the created date and (b) the path to all search results of a Spotlight search?
TIA and kind regards, Friedrichvatolin wrote:
Morning.
How can I enable the Finder to show (a) the created date
you can't,
and (b) the path to all search results of a Spotlight search?
when you select an item among the search result its full path is displayed at the bottom of the search window. that's the best you can do.
TIA and kind regards, Friedrich -
How to get save result from EXECUTE from a dynamic SQL query in another table?
Hi everyone,
I have this query:
declare @query varchar(max) = ''
declare @par varchar(10)
SELECT @par = col1 FROM Set
declare @region varchar(50)
SELECT @region = Region FROM Customer
declare @key int
SELECT @key = CustomerKey FROM Customer
SET @query = 'SELECT CustomerKey FROM Customer where ' + @par + ' = '+ @key+ ' '
EXECUTE (@query)
With this query I want get col1 from SET and compare it to the column Region from Customer. I would like to get the matching CustomerKey for it.
After execution it says commands are executed successfully. But I want to save the result from @query in another table. I looked it up and most people say to use sp_executesql. I tried a few constructions as sampled and I would always get this error:
Msg 214, Level 16, State 2, Procedure sp_executesql, Line 12
Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'.
So the output should be a list of CustomerKeys in another table.
How can I save the results from EXECUTE into a variable? Then I assume I can INSERT INTO - SELECT in another table.
ThanksCREATE TABLE Customer
(CustomerKey INT , Name NVARCHAR(100));
GO
INSERT dbo.Customer
VALUES ( 1, N'Sam' )
GO
DECLARE @query nvarchar(max) = ''
declare @par varchar(10) = 'Name',
@key varchar(10) = 'Sam'
CREATE TABLE #temp ( CustomerKey INT );
SET @query =
insert #temp
SELECT CustomerKey
FROM Customer
where ' + @par + ' = '''+ @key+ ''' '
PRINT @query
EXEC sp_executesql @query
SELECT *
FROM #temp
DROP TABLE #temp;
DROP TABLE dbo.Customer
Cheers,
Saeid Hasani
Database Consultant
Please feel free to contact me at [email protected] as well as on Twitter and Facebook.
[My Writings on TechNet Wiki] [T-SQL Blog] [Curah!]
[Twitter] [Facebook] [Email] -
Hi Team,
I Have one requirement,In SSRS Reporsitory 3000 reports are available.
My end user requirement All 3000 reports are used Table names & columns list of each wise to display single table or single result set.
I find out all 3000 reports details are diplayed single results set like
Report Id,Path,Dataset,Source Query Text,Datasource
In Source Query Text column level All reports Queries are available but I want Each Report wise Table name & columns List.If any solution Please share me.
Regards
RamaHi Ramakoteswara,
According your description, you want to show used tables and columns of each report, and display is into a single result set. Right?
In this scenario, we don't know where to find a column contains the Source Query Text. With my understanding, in Reporting Services, we have Catalog table in ReportServer DataBase, it has a column called Content stores the report code (.xml). In the
code we can find the Query and Fields. Then you need to use VB/C# code to parse each .xml code of each report and fetch out the table name and columns. We do not support writing any queries against SSRS DataBase or parsing data records in any
table.
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Display Error - People Search Results Page
Hi
Can anyone help me figure out what I've done wrong with this code to get this error? I'm not a programmer so I'm just trying to get this one thing fixed. Thanks!
Display Error: The display template had an error. You can correct it by fixing the template or by changing the display template used in either the Web Part properties or Result Types.
Template '~sitecollection/_catalogs/masterpage/Display Templates/Search/UIF_Item_Person.js' not found or has syntax errors. (LoadTemplate: ~sitecollection/_catalogs/masterpage/Display Templates/Search/Group_Default.js)
<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
<head>
<title>UIF People Item with Work Phone</title>
<!--[if gte mso 9]><xml>
<mso:CustomDocumentProperties>
<mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
<mso:MasterPageDescription msdt:dt="string">Displays a result tailored for a person.</mso:MasterPageDescription>
<mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
<mso:TargetControlType msdt:dt="string">;#SearchResults;#</mso:TargetControlType>
<mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
<mso:CrawlerXSLFile msdt:dt="string"></mso:CrawlerXSLFile>
<mso:ManagedPropertyMapping msdt:dt="string">'AboutMe':'AboutMe','AccountName':'AccountName','BaseOfficeLocation':'BaseOfficeLocation','Department':'Department','HitHighlightedProperties':'HitHighlightedProperties','Interests':'Interests','JobTitle':'JobTitle','Organization':'Organization','LastModifiedTime':'LastModifiedTime','Memberships':'Memberships','PastProjects':'PastProjects','Path':'Path','PictureURL':'PictureURL','PreferredName':'PreferredName','Responsibilities':'Responsibilities','Schools':'Schools','ServiceApplicationID':'ServiceApplicationID','SipAddress':'SipAddress','Skills':'Skills','UserProfile_GUID':'UserProfile_GUID','WorkEmail':'WorkEmail','OfficeNumber':'OfficeNumber','OfficeLocator':'OfficeLocator','WorkPhone':'WorkPhone','MobilePhone':'MobilePhone','HomePhone':'HomePhone','WorkId':'WorkId','YomiDisplayName':'YomiDisplayName'</mso:ManagedPropertyMapping>
<mso:HtmlDesignStatusAndPreview msdt:dt="string">https://uif.sharepoint.com/search/_catalogs/masterpage/Display%20Templates/Search/UIF_Item_Person.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
<mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
<mso:HtmlDesignPreviewUrl msdt:dt="string"></mso:HtmlDesignPreviewUrl>
</mso:CustomDocumentProperties>
</xml><![endif]-->
</head>
<body>
<div id="Item_Person">
<!--#_
if(!$isNull(ctx.CurrentItem) && !$isNull(ctx.ClientControl)){
var id = ctx.ClientControl.get_nextUniqueId();
var itemId = id + Srch.U.Ids.item;
var hoverId = id + Srch.U.Ids.hover;
$setResultItem(itemId, ctx.CurrentItem);
var container_id = id + "_peopleContainer";
var hhProps = Srch.U.createXMLDocument("<root>" + ctx.CurrentItem.HitHighlightedProperties + "</root>");
var encodedPath = $urlHtmlEncode(ctx.CurrentItem.Path);
var has_pn = !$isEmptyString(ctx.CurrentItem.PreferredName);
var has_sip = !$isEmptyString(ctx.CurrentItem.SipAddress);
var has_email = !$isEmptyString(ctx.CurrentItem.WorkEmail);
var has_onumber = !$isEmptyString(ctx.CurrentItem.OfficeNumber);
var has_bolocation = !$isEmptyString(ctx.CurrentItem.BaseOfficeLocation);
var has_olocator = !$isEmptyString(ctx.CurrentItem.OfficeLocator);
var has_wphone = !$isEmptyString(ctx.CurrentItem.WorkPhone);
var has_mphone = !$isEmptyString(ctx.CurrentItem.MobilePhone);
var has_hphone = !$isEmptyString(ctx.CurrentItem.HomePhone);
var has_jt = !$isEmptyString(ctx.CurrentItem.JobTitle);
var has_dp = !$isEmptyString(ctx.CurrentItem.Department);
var has_org = !$isEmptyString(ctx.CurrentItem.Organization);
var has_abme = !$isEmptyString(ctx.CurrentItem.AboutMe);
var has_resp = !$isEmptyString(ctx.CurrentItem.Responsibilities);
var has_pp = !$isEmptyString(ctx.CurrentItem.PastProjects);
var has_ski = !$isEmptyString(ctx.CurrentItem.Skills);
var has_sch = !$isEmptyString(ctx.CurrentItem.Schools);
var has_int = !$isEmptyString(ctx.CurrentItem.Interests);
var has_vlm = !$isEmptyString(ctx.CurrentItem.ProfileViewsLastMonth);
var has_vlw = !$isEmptyString(ctx.CurrentItem.ProfileViewsLastWeek);
var has_query = !$isEmptyString(ctx.CurrentItem.ProfileQueriesFoundYou);
var isSelfSrch = (has_vlm == true || has_vlw == true || has_query == true);
var delimiter = "";
var userPersonaId = $htmlEncode(id) + "_peopleUserPersona";
var uSip = ctx.CurrentItem.SipAddress;
var uEmail = ctx.CurrentItem.WorkEmail;
var uName = ctx.CurrentItem.PreferredName;
var uPicUrl = ctx.CurrentItem.PictureURL;
var hoverUrl = "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_Person_HoverPanel.js";
_#-->
<div id="_#= $htmlEncode(container_id) =#_" class="ms-srch-people-outerContainer ms-srch-resultHover">
<div id="_#= $htmlEncode(itemId) =#_" name="Item" class="ms-srch-people-item" onmouseover="EnsureScriptParams('SearchUI.js', 'HP.Init', event, '_#=$scriptEncode(itemId) =#_', '_#=$scriptEncode(hoverId) =#_', '_#=$scriptEncode(hoverUrl) =#_');" onmouseout="EnsureScriptParams('SearchUI.js', 'HP.Hide');">
<div id="_#= $htmlEncode(hoverId) =#_" class="ms-srch-hover-outerContainer"></div>
<div id="UserPersonaContainer">
<div id="UserPersona">
<div id="_#= userPersonaId =#_"></div>
</div>
</div>
<div id="UserInfoContainer">
<div id="ContactInfo">
<div id="NameField">
<!--#_
var encodedName = (has_pn == true) ? $htmlEncode(ctx.CurrentItem.PreferredName) : $htmlEncode(ctx.CurrentItem.YomiDisplayName);
var displayName = Srch.U.getSingleHHXMLNodeValue(hhProps, "preferredname");
if ($isEmptyString(displayName)) { displayName = encodedName }
_#-->
<div id="NameValue" class="ms-srch-ellipsis ms-textLarge">
<a clicktype="Result" id="NameFieldLink" href="_#= encodedPath =#_" title="_#= encodedName =#_">_#= displayName =#_</a>
</div>
</div>
<!--#_
if(has_jt == true) {
_#-->
<div id="JobTitleField">
<!--#_
var encodedJtitle = $htmlEncode(ctx.CurrentItem.JobTitle);
var displayJtitle = Srch.U.getSingleHHXMLNodeValue(hhProps, "jobtitle");
if ($isEmptyString(displayJtitle)) { displayJtitle = encodedJtitle }
_#-->
<div id="JobTitleValue" class="ms-srch-ellipsis" title="_#= encodedJtitle =#_"> _#= displayJtitle =#_ </div>
</div>
<!--#_
_#-->
<!--#_
if(has_dp == true) {
_#-->
<div id="DepartmentField">
<!--#_
var encodedDept = $htmlEncode(ctx.CurrentItem.Department);
var displayDept = Srch.U.getSingleHHXMLNodeValue(hhProps, "department");
if ($isEmptyString(displayDept)) { displayDept = encodedDept }
_#-->
<div id="DepartmentValue" class="ms-srch-ellipsis" title="_#= encodedDept =#_"> _#= displayDept =#_ </div>
</div>
<!--#_
_#-->
<!--#_
if(has_org == true) {
_#-->
<div id="Organization">
<!--#_
var encodedorg = $htmlEncode(ctx.CurrentItem.Organization);
var displayorg = Srch.U.getSingleHHXMLNodeValue(hhProps, "Organization");
if ($isEmptyString(displayorg)) { displayorg = encodedorg }
_#-->
<div id="OrganizationValue" class="ms-srch-ellipsis" title="_#= encodedorg =#_"> _#= displayorg =#_ </div>
</div>
<!--#_
_#-->
<!--#_
if(has_onumber == true) {
_#-->
<div id="OfficeNumber">
<!--#_
var encodedonumber = $htmlEncode(ctx.CurrentItem.OfficeNumber);
var displayonumber = Srch.U.getSingleHHXMLNodeValue(hhProps, "OfficeNumber");
if ($isEmptyString(displayonumber)) { displayonumber = encodedonumber }
_#-->
<div id="OfficeNumberValue" class="ms-srch-ellipsis" title="_#= encodedonumber =#_"> <b>Office:</b> _#= displayonumber =#_ </div>
</div>
<!--#_
_#-->
<!--#_
if(has_bolocation == true) {
_#-->
<div id="OfficeBaseLocation">
<!--#_
var encodedbolocation = $htmlEncode(ctx.CurrentItem.BaseOfficeLocation);
var displaybolocation = Srch.U.getSingleHHXMLNodeValue(hhProps, "BaseOfficeLocation");
if ($isEmptyString(displaybolocation)) { displaybolocation = encodedbolocation }
_#-->
<div id="BaseOfficeLocationValue" class="ms-srch-ellipsis" title="_#= encodedbolocation =#_"> <b>Office Location:</b> _#= displaybolocation =#_ </div>
</div>
<!--#_
_#-->
<!--#_
if(has_olocator == true) {
_#-->
<div id="OfficeLocator">
<!--#_
var encodedolocator = $htmlEncode(ctx.CurrentItem.OfficeLocator);
var displayolocator = Srch.U.getSingleHHXMLNodeValue(hhProps, "OfficeLocator");
if ($isEmptyString(displayolocator)) { displayolocator = encodedolocator }
_#-->
<div id="OfficeLocatorValue" class="ms-srch-ellipsis" title="_#= encodedolocator =#_"> <b>Office Locator:</b> _#= displayolocator =#_ </div>
</div>
<!--#_
_#-->
<!--#_
if(has_wphone == true) {
_#-->
<div id="WorkPhone">
<!--#_
var encodedwphone = $htmlEncode(ctx.CurrentItem.WorkPhone);
var displaywphone = Srch.U.getSingleHHXMLNodeValue(hhProps, "WorkPhone");
if ($isEmptyString(displaywphone)) { displaywphone = encodedwphone }
_#-->
<div id="WorkPhoneValue" class="ms-srch-ellipsis" title="_#= encodedwphone =#_"> <b>Office Phone:</b> _#= displaywphone =#_ </div>
</div>
<!--#_
_#-->
<!--#_
if(has_mphone == true) {
_#-->
<div id="MobilePhone">
<!--#_
var encodedmphone = $htmlEncode(ctx.CurrentItem.MobilePhone);
var displaymphone = Srch.U.getSingleHHXMLNodeValue(hhProps, "MobilePhone");
if ($isEmptyString(displaymphone)) { displaymphone = encodedmphone }
_#-->
<div id="MobilePhoneValue" class="ms-srch-ellipsis" title="_#= encodedmphone =#_"> <b>Mobile Phone:</b> _#= displaymphone =#_ </div>
</div>
<!--#_
_#-->
<!--#_
if(has_hphone == true) {
_#-->
<div id="HomePhone">
<!--#_
var encodedhphone = $htmlEncode(ctx.CurrentItem.HomePhone);
var displayhphone = Srch.U.getSingleHHXMLNodeValue(hhProps, "HomePhone");
if ($isEmptyString(displayhphone)) { displayhphone = encodedhphone }
_#-->
<div id="HomePhoneValue" class="ms-srch-ellipsis" title="_#= encodedhphone =#_"> <b>Home Phone:</b> _#= displayhphone =#_ </div>
</div>
<!--#_
_#-->
<div>
office:_#= ctx.CurrentItem.OfficeNumber =#_
OfficeLocator: <a clicktype="Result" id="NameFieldLink" href="_#= ctx.CurrentItem.OfficeLocator =#_">_#= ctx.CurrentItem.OfficeNumber =#_</a>
</div>
<!--#_
_#-->
</div>
<!--#_
if(has_resp == true || has_ski == true || has_pp == true || has_int == true || has_sch == true) {
_#-->
<div id="MoreInfoShort">
<!--#_
if(has_resp == true) {
var encodedVal = Srch.U.getMultipleHHXMLNodeValues(hhProps, "responsibilities", 3, delimiter);
if (Srch.U.e(encodedVal)) { encodedVal = $htmlEncode(Srch.U.getUnEncodedMultiValuedResults(ctx.CurrentItem.Responsibilities, 3, delimiter))}
if (!Srch.U.e(encodedVal)) {
_#-->
<div id="ResponsibilitiesValue" class="ms-srch-ellipsis">
<span id="FieldTitle" class="ms-soften"> _#= $htmlEncode(Srch.Res.item_People_Responsibilities) =#_ </span>
_#= encodedVal =#_
</div>
<!--#_
_#-->
<!--#_
} else if(has_ski == true) {
var encodedVal = Srch.U.getMultipleHHXMLNodeValues(hhProps, "skills", 3, delimiter);
if (Srch.U.e(encodedVal)) { encodedVal = $htmlEncode(Srch.U.getUnEncodedMultiValuedResults(ctx.CurrentItem.Skills, 3, delimiter))}
if (!Srch.U.e(encodedVal)) {
_#-->
<div id="SkillsValue" class="ms-srch-ellipsis">
<span id="FieldTitle" class="ms-soften"> _#= $htmlEncode(Srch.Res.item_People_Skills) =#_ </span>
_#= encodedVal =#_
</div>
<!--#_
_#-->
<!--#_
} else if(has_pp == true) {
var encodedVal = Srch.U.getMultipleHHXMLNodeValues(hhProps, "pastprojects", 3, delimiter);
if (Srch.U.e(encodedVal)) { encodedVal = $htmlEncode(Srch.U.getUnEncodedMultiValuedResults(ctx.CurrentItem.PastProjects, 3, delimiter))}
if (!Srch.U.e(encodedVal)) {
_#-->
<div id="PastProjectsValue" class="ms-srch-ellipsis">
<span id="FieldTitle" class="ms-soften"> _#= $htmlEncode(Srch.Res.item_People_PastProjects) =#_ </span>
_#= encodedVal =#_
</div>
<!--#_
_#-->
<!--#_
} else if(has_int == true) {
var encodedVal = Srch.U.getMultipleHHXMLNodeValues(hhProps, "interests", 3, delimiter);
if (Srch.U.e(encodedVal)) { encodedVal = $htmlEncode(Srch.U.getUnEncodedMultiValuedResults(ctx.CurrentItem.Interests, 3, delimiter))}
if (!Srch.U.e(encodedVal)) {
_#-->
<div id="InterestsValue" class="ms-srch-ellipsis">
<span id="FieldTitle" class="ms-soften"> _#= $htmlEncode(Srch.Res.item_People_Interests) =#_ </span>
_#= encodedVal =#_
</div>
<!--#_
_#-->
<!--#_
} else if(has_sch == true){
var encodedVal = Srch.U.getMultipleHHXMLNodeValues(hhProps, "schools", 3, delimiter);
if (Srch.U.e(encodedVal)) { encodedVal = $htmlEncode(Srch.U.getUnEncodedMultiValuedResults(ctx.CurrentItem.Schools, 3, delimiter))}
if (!Srch.U.e(encodedVal)) {
_#-->
<div id="SchoolsValue" class="ms-srch-ellipsis">
<span id="FieldTitle" class="ms-soften"> _#= $htmlEncode(Srch.Res.item_People_Schools) =#_ </span>
_#= encodedVal =#_
</div>
<!--#_
_#-->
<!--#_
_#-->
</div>
<!--#_
_#-->
<!--#_
if(has_abme == true || has_ski == true || has_pp == true || has_int == true) {
_#-->
<div id="MoreInfoLong">
<!--#_
if(has_abme == true) {
var encodedVal = Srch.U.getTrimmedProcessedHHXMLString(Srch.U.getSingleHHXMLNodeValue(hhProps, "aboutme"), 125);
if (Srch.U.e(encodedVal)) { encodedVal = $htmlEncode(Srch.U.getTrimmedString(ctx.CurrentItem.AboutMe, 125)) }
if (!Srch.U.e(encodedVal)) {
_#-->
_#= encodedVal =#_
<!--#_
_#-->
<!--#_
} else if(has_ski == true && has_resp == true) {
var encodedVal = Srch.U.getTrimmedProcessedHHXMLString(Srch.U.getMultipleHHXMLNodeValues(hhProps, "skills", 3, delimiter), 125);
if (Srch.U.e(encodedVal)) { encodedVal = $htmlEncode(Srch.U.getTrimmedString(Srch.U.getUnEncodedMultiValuedResults(ctx.CurrentItem.Skills, 3, delimiter), 125)) }
if (!Srch.U.e(encodedVal)) {
_#-->
<span id="FieldTitle" class="ms-soften"> _#= $htmlEncode(Srch.Res.item_People_Skills) =#_ </span>
_#= encodedVal =#_
<!--#_
_#-->
<!--#_
} else if(has_pp == true && (has_ski == true || has_resp == true)) {
var encodedVal = Srch.U.getTrimmedProcessedHHXMLString(Srch.U.getMultipleHHXMLNodeValues(hhProps, "pastprojects", 3, delimiter), 125);
if (Srch.U.e(encodedVal)) { encodedVal = $htmlEncode(Srch.U.getTrimmedString(Srch.U.getUnEncodedMultiValuedResults(ctx.CurrentItem.PastProjects, 3, delimiter), 125)) }
if (!Srch.U.e(encodedVal)) {
_#-->
<span id="FieldTitle" class="ms-soften"> _#= $htmlEncode(Srch.Res.item_People_PastProjects) =#_ </span>
_#= encodedVal =#_
<!--#_
_#-->
<!--#_
} else if(has_int == true && (has_pp == true || has_ski == true || has_resp == true)) {
var encodedVal = Srch.U.getTrimmedProcessedHHXMLString(Srch.U.getMultipleHHXMLNodeValues(hhProps, "interests", 3, delimiter), 125);
if (Srch.U.e(encodedVal)) { encodedVal = $htmlEncode(Srch.U.getTrimmedString(Srch.U.getUnEncodedMultiValuedResults(ctx.CurrentItem.Interests, 3, delimiter), 125)) }
if (!Srch.U.e(encodedVal)) {
_#-->
<span id="FieldTitle" class="ms-soften"> _#= $htmlEncode(Srch.Res.item_People_Interests) =#_ </span>
_#= encodedVal =#_
<!--#_
_#-->
<!--#_
_#-->
</div>
<!--#_
_#-->
<!--#_
if(isSelfSrch == true) {
_#-->
<hr class="ms-srch-people-item-separator" />
<div id="SelfSearchInfo">
<div id="Heading">
<a id="EditProfileLink" href="_#= $urlHtmlEncode(ctx.CurrentItem.EditProfileUrl) =#_"> _#= $htmlEncode(Srch.Res.item_People_EditProfileLink) =#_ </a>
</div>
<div id="Frequency">
<span id="FieldTitle" class="ms-soften"> _#= $htmlEncode(Srch.Res.item_People_SelfSearchFrequency) =#_ </span>
<ul id="FrequencyCard">
<li id="MonthlyViews">
<!--#_
var encodedVal = (ctx.CurrentItem.ProfileViewsLastMonth == 1) ? $htmlEncode(String.format(Srch.Res.item_People_SelfSearchFrequency_ViewsMonths_Singular, ctx.CurrentItem.ProfileViewsLastMonth)) :
$htmlEncode(String.format(Srch.Res.item_People_SelfSearchFrequency_ViewsMonths_Plural, ctx.CurrentItem.ProfileViewsLastMonth));
_#-->
_#= encodedVal =#_
</li>
<li id="DailyViews">
<!--#_
var encodedVal = (ctx.CurrentItem.ProfileViewsLastWeek == 1) ? $htmlEncode(String.format(Srch.Res.item_People_SelfSearchFrequency_ViewsWeeks_Singular, ctx.CurrentItem.ProfileViewsLastWeek)) :
$htmlEncode(String.format(Srch.Res.item_People_SelfSearchFrequency_ViewsWeeks_Plural, ctx.CurrentItem.ProfileViewsLastWeek));
_#-->
_#= encodedVal =#_
</li>
</ul>
</div>
<!--#_
if(has_query == true) {
_#-->
<div id="Keywords">
<span id="FieldTitle" class="ms-soften"> _#= $htmlEncode(Srch.Res.item_People_SelfSearchKeywords) =#_ </span>
<!--#_
var encodedVal = $htmlEncode(Srch.U.getTrimmedString(Srch.U.getUnEncodedMultiValuedResults(ctx.CurrentItem.ProfileQueriesFoundYou, 5, delimiter), 84));
if (!Srch.U.e(encodedVal)) {
_#-->
_#= encodedVal =#_
<!--#_
_#-->
</div>
<!--#_
_#-->
<!--#_
if(!Srch.U.n(ctx.CurrentItem.LastModifiedTime))
var lastModifiedTime = ctx.CurrentItem.LastModifiedTime;
var encodedLastModifiedTimeId = $htmlEncode(id + "_lastModifiedTime");
AddPostRenderCallback(ctx, function()
Srch.U.renderFriendlyTimeIntervalString(lastModifiedTime, encodedLastModifiedTimeId);
_#-->
<div id="LastModifiedTime">
<span class="ms-textSmall">_#= $htmlEncode(Srch.Res.item_People_LastModified) =#_</span>
<span id="_#= encodedLastModifiedTimeId =#_" class="ms-textSmall ms-srch-ellipsis"></span>
</div>
<!--#_
_#-->
</div>
<!--#_
_#-->
</div>
</div>
</div>
<!--#_
AddPostRenderCallback(ctx, function(){
EnsureScriptFunc("clienttemplates.js", "RenderUserFieldWorker", function() {
var getUserPersona = function() {
var renderCtx = new ContextInfo();
renderCtx.Templates = {};
renderCtx.Templates["Fields"] = {};
var fieldSchemaData = { "PictureOnly":"1", "PictureSize": "Size_72px"};
var listSchema = {"EffectivePresenceEnabled": "1", "PresenceAlt": Srch.Res.item_People_NoPresenceAvailable};
var userData = {"title": uName, "email": uEmail, "picture": uPicUrl, "sip": uSip};
var personaControlElement = document.getElementById(userPersonaId);
if (!Srch.U.n(personaControlElement))
personaControlElement.innerHTML = RenderUserFieldWorker(renderCtx, fieldSchemaData, userData, listSchema);
if(typeof(ctx.EnqueueImnRequest) == "undefined") { ctx.EnqueueImnRequest = false; }
if (ctx.EnqueueImnRequest == false) {
ctx.ClientControl.add_oneTimeResultRendered(function(){ if (typeof(ProcessImn) != "undefined") { ProcessImn(); } });
ctx.EnqueueImnRequest = true;
getUserPersona();
_#-->
<!--#_
_#-->
</div>
</body>
</html>Hi Chasquad,
From the code in your post, you need to delete the "<!--#_ }_#-->" after the div.
I also recommend to add this div into the <div
id="OfficeLocator">, and the code should be like this:
<!--#_
if(has_olocator == true) {
_#-->
<div id="OfficeLocator">
<!--#_
var encodedolocator = $htmlEncode(ctx.CurrentItem.OfficeLocator);
var displayolocator = Srch.U.getSingleHHXMLNodeValue(hhProps, "OfficeLocator");
if ($isEmptyString(displayolocator)) { displayolocator = encodedolocator }
_#-->
<div id="OfficeLocatorValue" class="ms-srch-ellipsis" title="_#= encodedolocator =#_">OfficeLocator: <a clicktype="Result" id="NameFieldLink" href="_#= ctx.CurrentItem.OfficeLocator =#_">_#= ctx.CurrentItem.OfficeNumber =#_</a></div>
</div>
<!--#_
_#-->
Thanks,
Victoria
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Victoria Xia
TechNet Community Support -
This latest version of iTunes displays the store search results in jibberish.
When I search for songs in the iTunes store with the latest version of iTunes the results are all garbeled up. If you click on something the next page seems OK. Any ideas on how to fix this? Do I have to revert to an old version of iTunes?
Click the word Store at the top od the screen by View, File, etc
-
Content Snippets not displayed in TREX Search results
Hi Community,
next Problem with my Repository Manager. I used the tutorial from Thilo Brandt as start.
I can index documents from a third party content management system, but when i search for a word form the content it won't be found. When i search for a word from the title or the filename, the document appears in the result list. But, there is no content snippet.
I had this problem a few days ago. It was the contentlegth-attribute, which was 0. I fixed this an everything works fine. But now i have the same problem and the contentlegth attribute is correct.
Any ideas?
Greetz MarcusSolved my Problem. The Security Manager had an error. It denied the access to the content for the portaluser, which is used for indexing the content.
Marcus -
Dynamic SQL select from unknown table until runtime
I need to do a select from a table that is unknown until runtime. Is there any good examples of this. The Store Procedure will take in the table name and return a row.
I am not using inline SQL because there is a lot more complexity involved . What I need to do is understand how to reference this unknown table.
Here is an example of what I have written so far.
PACKAGE pk_LoadNativeDataItems IS
PROCEDURE version;
TYPE RowDataCur IS REF CURSOR;
PROCEDURE pr_LoadNativeDataItems(p_flag IN NUMBER
p_how_many_rows_to_fetch IN NUMBER,
p_row_data OUT RowDataCur);
PROCEDURE pr_LoadNativeDataItems(p_flag IN NUMBER
p_how_many_rows_to_fetch IN NUMBER,
p_table_name IN VARCHAR,
p_row_data OUT RowDataCur) IS
BEGIN
OPEN p_row_data FOR
SELECT * from ||p_table_name||;
END pr_LoadNativeDataItems;
END pk_LoadNativeDataItems;
Thanks for any help
TonyHere is example for similar question:
Using variables for tables and columns -
How to display search results in a table or in different columns
Hi
How can i display search results in multiple columns or in a table so that the user can sort the results based on a particular property displayed in the search results.
Thanks in advance
Regards,
VidyaHello,
To display search results in a table, in different columns or more... you should modify SearchResultLayoutSet.
Create your own StandardSearchResultRenderer (exp My_StandardSearchResultRenderer) and add to SearchResultLayoutSet. Than change whatever you like to achive your aim.
Thank you.
Hope this helps. -
It takes me to the results page but it is not allowing me to see any results. Need urgent help
http://foyermakeover.businesscatalyst.com/index.html
<div class="letsmakeitwork">
<form id="catsearchform71667"
method="post" action="/Default.aspx?SiteSearchID=2433&ID=/search.html">
<input type="search" placeholder="Search" />
</form>
however they do appear on a test search (below is the link).
http://foyermakeover.businesscatalyst.com/asdasdas
<p>
{tag_pagecontent}</p>
<p><br />
</p>
<p><br />
</p>
<p>
</p>
<form name="catsearchform93661" method="post" action="/Default.aspx?SiteSearchID=2433&ID=/search.html">
<div class="search-box"><input class="cat_textbox_small" type="text" name="CAT_Search" id="CAT_Search" /><input class="cat_button" type="submit" value="Search" /></div>
</form>
<div><br />
</div>
<div><br />
</div>
<div><br />
</div>Hi Martin,
As I understand, the issue you encountered is the LastModifiedTime displayed incorrect in search result.
If you go to CA > Search service application > Search schema, in Managed Properties, type LastModifiedTime, then you will get LastModifiedTime property. Click it and you will find the property is mapped to five crawled properties.
I’d recommend you create a new managed property and only map it to ows_modified property. Then test the issue again.
http://spvee.wordpress.com/2013/10/09/content-search-web-part-cswp-sort-by-modified-datetime/
Regards,
Rebecca Tu
TechNet Community Support -
Search results not displaying correct last modified date
Hello
I have a bit of a strange issue. I have a SharePoint site that was upgraded from SP2010 to SP2013. A document has been created and uploaded into SharePoint on 1 August 2014 and the file has since been edited. In the search results the last
modified date is appearing as '8 January'. Note that this document was not originally created from a blank one but was instead a Word document that was received by the user and then edited and then uploaded into SharePoint.
I have checked my locale settings and everything is set to New Zealand.
I have rerun a full crawl on my search database and this hasn't helped.
Also, I have multiple sharepoint web applications on my server using the same search service application. is it best to separate these out?Hi Martin,
As I understand, the issue you encountered is the LastModifiedTime displayed incorrect in search result.
If you go to CA > Search service application > Search schema, in Managed Properties, type LastModifiedTime, then you will get LastModifiedTime property. Click it and you will find the property is mapped to five crawled properties.
I’d recommend you create a new managed property and only map it to ows_modified property. Then test the issue again.
http://spvee.wordpress.com/2013/10/09/content-search-web-part-cswp-sort-by-modified-datetime/
Regards,
Rebecca Tu
TechNet Community Support -
Dynamic SQL for table creation.
Hi Group
I'm executing a procedure using dynamic sql to create a table on my own schema, but it returns :ORA-01031: insufficient privileges, why?, if i executing the procedure on my schema, however if gave grants being sys' GRANT CREATE ANY TABLE TO HR; the creation of the table is successful.
CREATE OR REPLACE PROCEDURE PRC_CREA_TABLA(p_nombre_tabla VARCHAR2, p_esp_columnas VARCHAR2) AS
BEGIN
-- EXECUTE IMMEDIATE 'GRANT CREATE ANY TABLE TO HR';
EXECUTE IMMEDIATE 'CREATE TABLE ' || p_nombre_tabla || ' ('
|| p_esp_columnas || ')';
-- EXECUTE IMMEDIATE 'REVOKE CREATE ANY TABLE FROM HR';
END;
/Thansk a lot
ORACLE 11.2.0.2
ORACLE LINUX 6Note the name of this forum is "SQL Developer *(Not for general SQL/PLSQL questions)*", so only for issues with the SQL Developer tool. Please post these questions under the dedicated {forum:id=75} forum.
Un saludo,
K. -
Avoid Hard Parsing for executing dynamic SQL using DUAL table Oracle
I want to know if dynamic sql statements involving DUAL table can be modified to remove HARD PARSING.
We have several SQL statements are stored in configuration table, here is sample example
-- query 1 before replacing index values as stored in config table ---
select count(*) from dual where 'REPLACE_VALUE_OF_INDEX_3' IN ('K')
AND (('REPLACE_VALUE_OF_INDEX_13' IN ('1053','1095','1199') ) OR ('REPLACE_VALUE_OF_INDEX_13' IN ('1200') ))
AND 'REPLACE_VALUE_OF_INDEX_2' IN ('6')
AND 'REPLACE_VALUE_OF_INDEX_15' IN ('870001305')
-- query 1 after replacing index values--
select count(*) from dual where 'REPLACE_VALUE_OF_INDEX_10' IN ('K')
AND (('1030' IN ('1053','1095','1199') ) OR ('1030' IN ('1200') ))
AND '2' IN ('6')
AND 'X' IN ('870001305')
-- query 2 before replacing index values as stored in config table --
select count(*) from dual where 'REPLACE_VALUE_OF_INDEX_5' IN ('361A','362A')
AND 'REPLACE_VALUE_OF_INDEX_22' BETWEEN '200707' AND '200806'
-- query 2 after replacing index values--
select count(*) from dual where '3MAA' IN ('361A','362A') AND '201304' BETWEEN '200707' AND '200806'If I got it right you have some (maybe lots of) conditions stored in a table (be patient - it's my interpretation)
create table eb_conditions as
select 1 rid,q'{:5 IN ('361A','362A') AND :3 BETWEEN '200707' AND '200806'}' cndtn from dual union all
select 2,q'{:2 IN ('361A','362A') AND :3 BETWEEN '200707' AND '200806'}' from dual union all
select 3,q'{:1 IN ('K') AND ((:2 IN ('1053','1095','1199') ) OR (:4 IN ('1200') )) AND :3 IN ('6') AND :5 IN ('870001305')}' from dual
RID
CNDTN
1
:5 IN ('361A','362A') AND :3 BETWEEN '200707' AND '200806'
2
:2 IN ('361A','362A') AND :3 BETWEEN '200707' AND '200806'
3
:1 IN ('K') AND ((:2 IN ('1053','1095','1199') ) OR (:4 IN ('1200') )) AND :3 IN ('6') AND :5 IN ('870001305')
and you have to check the conditions using values stored in an array
I used a table instead: the vl at rid = 1 representing the value of bind variable :1 in eb_conditions table and so on ...
create table eb_array as
select 1 rid,'K' vl from dual union all
select 2,'1199' from dual union all
select 3,'200803' from dual union all
select 4,'1000' from dual union all
select 5,'870001305' from dual
RID
VL
1
K
2
1199
3
200803
4
1000
5
870001305
You want to check the conditions using select count(*) from dual where <condition with binds substituted fron the array>
Judging from the title Hard Parsing represents the major problem and you cannot avoid it since every condition to be verified is different from every other condition.
I think your best bet is not to evaluate conditions row by row - context shift cannot be avoided and there might be more than one for each iteration.
So try to do it in a single step:
declare
w_cndtn varchar2(4000);
w_clob clob;
w_cursor sys_refcursor;
one number;
two number;
begin
dbms_lob.createtemporary(w_clob,false);
for rw in (select rid,
max(cndtn) cndtn,
listagg(val,',') within group (order by rn)||',' usng
from (select c.rid,c.cndtn,c.rn,c.bind,
replace(rtrim(c.bind),':'||to_char(v.rid),''''||v.vl||'''') val
from (select rid,
cndtn,
regexp_substr(cndtn,':\d+ ',1,level) bind,
level rn
from eb_conditions
connect by level <= regexp_count(cndtn,':')
and prior rid = rid
and prior sys_guid() is not null
) c,
eb_array v
where instr(c.bind,':'||v.rid||' ') > 0
group by rid
loop
w_cndtn := rw.cndtn;
while instr(w_cndtn,':') > 0
loop
w_cndtn := replace(w_cndtn,trim(regexp_substr(w_cndtn,':\d+ ',1,1)),substr(rw.usng,1,instr(rw.usng,',') - 1));
rw.usng := substr(rw.usng,instr(rw.usng,',') + 1);
end loop;
w_cndtn := 'select '||to_char(rw.rid)||' cndtn_id,count(*) from dual where '||w_cndtn||' union all ';
w_clob := w_clob ||' '||w_cndtn;
end loop;
w_clob := substr(w_clob,1,instr(w_clob,'union all',-1,1) - 1);
open w_cursor for w_clob;
loop
fetch w_cursor into one,two;
exit when w_cursor%notfound;
dbms_output.put_line(to_char(one)||':'||to_char(two));
end loop;
dbms_lob.freetemporary(w_clob);
end;
1:0
2:0
3:0
Statement processed.
Regards
Etbin -
OIM 11g R2 Beta: Display default search results while displaying Catalog
All,
We are trying to achieve displaying a default search results automatically (based on any criteria) while displaying the Catalog screen. By OOTB feature, the Catalog search is empty and there won't be any results displayed while displaying the Catalog screen. Please provide any directions or inputs for achieving this functionality if anyone is aware of how to achieve this functionality.
Thanks in advance.
Regards
Kishore.In Search box enter any search item and click "Add to Cart" and then click "Checkout". Now in the same catalog screen at the right side of list of Cart Items you can see button as "Save As Profile". Give any name to this Profile and save the profile. Now if you click Catalog again, you can see the created profile under catalog search.
Maybe you are looking for
-
How to restore ipod touch without using itunes
Did a software update for my ipod touch and now my ipod is stuck on the connect to itunes screen and itunes and my computer don't recognze the device. I can get it into recovery mode and see it under devices on my computer but it won't install the dr
-
BAM: Problem with 'Binding' while creating event linkage
Hello colleagues. We have an ECC 6.0 and a PI 7.1 system. I want to create a prototype using the features of BAM. In transaction SWF_BAM, i tried to create a binding for the OB proxy parameters and the event object parameters. Unfortunately, the pro
-
Prob.. in login page
hi..all of u.... i have made a login page in html page...in which two text field there..named username and password... i want to do the stuff that if the user enter correct username and password..then it displays a pop up window mentioning that u hav
-
Getting error when removing Oracle Home
Hi, I'm in the process of removing un used oracle home, while executing the detachHome.sh script am getting the below error. Oracle version : 10.2.0.3 Os : Linux -2.6.9-42.ELsmp Error: xxxx+ASM2@xxxora05 /home/oracle > /oracle/product/10.2.0.3oct07/o
-
Hi there, is there anyone out there knows how to retrieve SMS removed by SE PC Suite? Few fews ago when i try to backup all my SMS onto my computer via SE PC Suite, it all just mysteriously disappeared. This is how it happen; I have placed all my (Se