we have facets on search page, all of them are taken from BP index, how can I add a new facet filter with params from variant index? when I run search query it build facets only with BP fields.
Related
I want to delete some records from ArangoDB UI through the length condition.
For example : For a collection, I want to delete records that are having the length of a string object as 9
FOR item IN collection
FILTER LENGTH(item.string) > 5
REMOVE item IN collection
I am trying to list all items in a section of Kentico as a drop-down list but want only one field value to be returned for each document.
What I have tried
Lists Nothing:
Documents.WithAllData["/Foo/Bar/Bar"].AllChildren.WithAllData.All.GetValue("FooBar")
Lists all document information:
Documents.WithAllData["/Foo/Bar/Bar"].AllChildren
You'd use a macro similar to this:
<select id="ddlItems">
{% Documents["/Foo/Bar/Bar"].Children.WithAllData.ApplyTransformation("cms.event.transformationname") %}
</select>
To list out all your items. The transformation will then have your column information:
<option>{% FooBar %}</option>
**** UPDATE ****
Based on your comment, you can simply use a sql query (which a macro will run anyway). If you know what page type you want to query you can go directly to that page type's table:
SELECT Col1, Col2, FROM Content_YourTable
If you need the data from your page type based on a particular path in the tree, then you can use something like this:
SELECT Col1, Col2
FROM View_CMS_Tree_Joined
INNER JOIN CONTENT_MenuItem on DocumentForeignKeyValue = MenuItemID
WHERE NodeAliasPath like '/Foo/Bar/Bar/%'
AND Classname = 'cms.menuitem'
I have two SharePoint list named city and town. I have created two datasets for each list in SQL Report Builder 3.0. The city dataset has ID and Title columns. Town dataset has ID, City_Id and Title.
My purpose is showing cityname and it's towns in same row.
I use LookupSet function like this:
=Join(LookupSet(Fields!ID.Value, Fields!City_ID.Value, Fields!Title.Value,"Town"), ",")
But, it gives just blank field. How I can use LookupSet function.
Thanks
Fields!ID.Value and Fields!City_ID.Value are not same type. Fields!ID is integer, Fields!City_ID.Value is string. So I re-write my expression like this
Join(LookupSet(Fields!ID.Value, CInt(Fields!City_ID.Value), Fields!Title.Value,"Town"), ",")
I am trying to update a Lookupvalue field "Items" via the SharePoint object model.
"Products" is a column in one list which is used as a lookup column to another list in field "Items".
In my webpart i have dropdown of Items now
string strItems = ddlItems.SelectedValue.ToString();
item["Items"] = new SPFieldLookupValue("strItems");
item.Update();
However, this is causing an error
Internally, SharePoint stores these references like this:
NumericID;#DisplayValue i.e.
145;#Soup
12;#Cake
874;#Steak
That is the kind of thing that should be in the constructor to SPFieldLookupValue. Or if it is more helpful, use the variant of the constructor that takes an int id and string display value.
More info is laid out here:
http://blogs.msdn.com/b/sridhara/archive/2007/08/25/update-quot-lookup-quot-fields-in-sharepoint-2007.aspx
You need to set the Items column to the ID of the SPItem represented by the product. You could do this by setting the DataTextValue of your dropdown to ID and then using the SelectedValue. You could also do a CAML query when a new item is selected in the dropdown.
You can find more information at the bottom of this blog post:
http://weblogs.asp.net/bsimser/archive/2005/05/13/406734.aspx
I'm trying to get the contents of a cell in a row in a YUI datatable.
I can use myDataTable.getSelectRows()[0] to get the first selected row. However, how do I get the contents of the first cell in that row?
It looks like getSelectRows() returns an array of record IDs. You can retrieve the corresponding record using getRecord(). Once you have a record, use getData() to retrieve the value of the field you are interested in.
var recordID = myDataTable.getSelectRows()[0],
record = myDataTable.getRecord(recordID);
console.log(record.getData("myField"));
http://developer.yahoo.com/yui/docs/YAHOO.widget.DataTable.html#method_getRecord
http://developer.yahoo.com/yui/docs/YAHOO.widget.Record.html#method_getData
I think I may have the answer for you assuming you have not already found it yourself.
I have the same kind of page with a datatable and a textarea field, when you select a row in the datatable calls the same page displays further detail from the selected row in the textarea field and retains selection of the selected row.
1: To do this I apply the following example MySQL query called AllMyBroadcasts...
SELECT #rownum :=#rownum + 1 RowNumber, p.*
FROM tblBroadcasts p, (SELECT #rownum := 0)r
ORDER BY Date DESC
the tblBroadcasts table has fields : Date, Narrative, ID
2: I then provide the following to the table row of my YUI Datatable within HTML hyperlink tags.
href="MyPage.php?SelectedBroadcastID=' .$row_Broadcasts['ID'].'&RowNumber=' .($row_Broadcasts['RowNumber'] -1 )
3: When the href is clicked MyPage reload with additional parameters SelectedBroadcastID and RowNumber the SelectedBroadcastID I use in a second query against tblBroadcasts called MySlectedBroadcast which a simple query on outputting all fields where the ID = SelectedbordcastID. I then to my field to display the narrative of my selected row in my textarea field.
The second paramater I do the following with.
$SelectedRowID = 0;
if( isset($_GET['RowNumber'])) {
$SelectedRowID = $_GET['RowNumber'];
}
Above I placed just after code covering my two queries.
4: Then finally to get the datatable to select the row of the selected row I include the following to the var yuidatdatable section of the datatable script...
yuidatatable1.select(yuidatatable1.getRow());
The -1 value referred to step 2 serves as a work around to fact that yuidatatable works on a 0 base and the MySQL referred to in step 1 on a 1 base.
There you go !
Perhaps there is a better why using get from within YUIDatatable scripting, be nice to know if so. That said this work fine for me and perhaps if you have not found an answer I hope this helps.