how to get current used list name. my scnerio is: i have a list said config. i have create one column say "test" whose datatype is "Managed Metadata". now after add this column.now when i edit this item and click on icon near to "test" column one dialog is open which is webtaggig.aspx something like that.
now, i had open my custom control in this page. when page opened , my control is loaded.
now on my custom control page load i want to get the list name programatically.
can any one suggest me how can i do this?
Have a look at the SPContext object. You would need something like SPContext.Current.List.Title to get the name or title of the current list.
Related
I need a lab report that has several pages. Each test has a unique reference number and I would like it to appear in the header according to what I have on the page. At the moment I only see one reference number and it remains unchanged after switching to another page. See attached image.
If possible, I would like to get rid of the SampleNo column so that its value is only in the header
The easiest way to do this is to reference the the textbox in your tablix that contains the "Sample No.".
Click the textbox that you have highlighted in the tablix, show the properties window (F4 in Visual Studio - can't remember in Report Builder, I think View/Properties).
Find the Name property of the textbox, this is often the name of the field it contains but not always.
In the example below the textbox name is 'oYear`
Next, set the expression in your header to be something like
=FIRST(ReportItems!oYear.Value)
Change oYear to whatever textbox name in your tablix is.
ReportItems refers to the rendered object name so here we just get the first on each page.
Here the first two pages from a small sample of data which groups by year.
If I navigate to the "Logs"-section in Azure to find the entries of my Azure Monitor, I get a tree structure that looks like this:
In this example I am just showing all exceptions without any formatting.
By default I can expand an entry and then expand the stack trace etc.
I want to get the same behaviour inside of a workbook.
But here my items do not have any tree like structure. I just get a list of items like this:
The only thing I found was to change the column settings like this:
But this is not doing what I want. I think my exceptions do not have an id-parent id structure.
Any proposals how I can just show the same result in the workbook like in the normal query editor?
The grid control used by workbooks doesn't currently have that "Expand" behavior that the logs view does for expanding a single row inline.
The closest thing you can do, in the column settings for the grid, you can set a column to be a link, and have that link either:
open up the "cell details" view to get a side panel with the contents of that specific cell (useful if the cell contains json or other content)
open up the "generic details" view that shows all of the contents in that row
so for example in this example making the "tablename" column a text renderer (you can use links with any kind of renderer though), and making it open up the "generic details" view with these settings:
will result in a popup on the side that looks like:
(in this case i only have 2 columns so it isn't very exciting!)
I have several tabs in my APEX application. The first is "Arlington". I want to reference that in my query. In other words I want to have a query that displays data where the city = whatever the tab might say. In this example, it would obviously be Arlington. Am I being clear? I know there is a way to do it. I know my tab name is T_ARLINGTON. But I don't know how to reference the actual text of the tab. Thank you!
Simply create one page item and mention the tab title like ( &P1_NAME.), now refresh the page the text item value should be applied the tab title. this method showing the dynamic tab title...
Goal:
To create a database with documentation about drivers. The idea is to create both vendor and protocol entries, and to link them, as follows: Inside the protocol creation form, I would like to select which vendor supports this protocol.
Approach:
I used the Create your own! button to create the following 2 Applications:
Vendors
Protocols
Inside the protocol creation page I've put a Database List field. With the following properties:
Name = vendors
Display type = select
Multiple select = false
hibernate query : I left this field blank.
xwiki class name = VendorsCode.VendorsClass
ID field name = doc.name
value field name : I left this field blank.
Problem:
To my surprise this works, but not entirely. When I open the form to add a protocol, in the vendor dropdown list there are now not only vendors but also a couple of other objects such as : "Blog.BlogIntroduction". Obviously I don't want that in the list. Why is it in there, and how can I get it out ?
I tried to add the value doc.name in the value field name box as well. But that actually only makes it worse. Now the list only contains "Blog.BlogIntroduction".
Notice that this is a clean fresh installation of xwiki. There's nothing special in this database.
What is going on here?
What you see is the default value for the select item in the Database List, as it is stored in the template page for "Protocol" objects.
A new Database List is initialized to show a list of blog posts, by having a default value of Blog.BlogPostClass for the "XWiki Class Name". (You can try this by creating a new Database List field in step 2 and open the edit view that field; just delete it after you are done.) For a fresh installed wiki there are two blog posts: the "blog page template" in Blog.BlogPageTemplate and the blog intro post in Blog.BlogIntroduction. Exactly these two items are shown initially.
After you fill in the value of your class in the "XWiki Class name" field, XWiki has a chance to find the actual list of possible values.
However it keeps the selected "default value" from the first attempt around (even though it makes no sense).
This looks like a bug to me, at least from a user experience.
How to fix it
First Step: The reason why your list only contains the bogus "default value" might be that the class you have given does not exist.
From what I see in the screenshot the class name looks ok for me, but then this field is not tolerant to any kind of typos, even something like a space before the class name. If the name does not fit exactly, it gives a (nearly) empty list.
If you cannot get it working with the class name and want to go the HQL route instead, use for the HQL field
, BaseObject as obj where doc.fullName = obj.name
and obj.className = 'VendorCode.VendorClass'
and doc.fullName != 'VendorCode.VendorTemplate'
and doc.fullName both as id and value field. This has the additional benefit that the template vendor is not available in the drop down, only the "real" objects.
After you managed to fix the name of the class, you should see a list of all vendor objects (including the VendorCode.VendorTemplate, unless you went the HQL route), and the remaining bogus default value. Now you can continue to the next step:
Second Step: if you managed to fix the class name, you will see your vendors in the drop down beside the default value; now it is time to get rid of the bogus default value. For this go to the template object of the application; e.g.
follow the "Edit Application" link on the start page of the "Protocol" application
then look at the box with the three checkboxes below the field definitions; the uppermost of the checkboxes says "Update class template"
this part contains a link to something called "ProtocolTemplate".
click the link and you end up at the template page
on the template page, click on edit and choose some other value from the drop down of vendors, and then click save.
The "BlogSomething" value should be gone now from the selection of vendors.
Optional step (not answering the quesion, but might be of interest anyway)
If you prefer to have no value at all preselected in the template, you need a few more steps:
in the application edit, edit the field and choose "multiple select" and display type "checkbox"
go to "next step" in the editor, then back to field edit with "previous step"
uncheck the checkbox beside the selected vendor entry, then open the field editor and set "display type" back to checkbox and unset the "multiple select" checkbox.
go the "next step" and "finish"
Afterwards if you create a new "protocol" entry, this is has an empty "vendor" preselected.
I have a picture library and I want to lookup to the name of picture in another generic list. I've tried:
lookupField.LookupField = "Name";
Then when I create a new item of this generic list, the picture lookup column show the list name of picture correctly, but after saving item this column is changed to blank.
Am I doing anything wrong here? Do I have to use other internal field name instead of "Name"?
Pleaze help...
OK, I found another solution. because I can not lookup to default name of picture library, so I create a hidden text field for picture library. This hidden field will get value of name in ItemUpdated event (no need ItemAdded because when I upload a new pic, it also called ItemUpdated <-- don't know why...)
public override void ItemUpdated(SPItemEventProperties properties) {
properties.ListItem["HiddenImageName"] = properties.ListItem["Name"].ToString();
properties.ListItem.Update();
}
Generic list will look up to this hidden field instead of default name field of Picture library