Format lookup column to display Name (FileLeafRef) - sharepoint

I have a custom publishing page layout I have created. The content type behind the page layout has a lookup column pointing to a document library where I store images. Basically, the pages I am creating from the layout are 'articles' and I have an associated image with each.
As you can probably guess by now, I want to display the lookup image on the page. However, I cannot for the life of me figure out how to do this. I have been inserting columns into the page layout via controls, but I'm not sure how to format it to look at the source document behind the lookup column. I am wondering if it is possible somehow through controls, and if not this way, if it can be done through modifying the XSL of a webpart. My last option which I don't want to use but I know it would work is a workflow (on new item creation, copy Name (FileLeafRef) into a hidden single line text field I coult utilize).
Does anyone know how to format a lookup column to display Name (FileLeafRef)?
Help is greatly appreciated!
-Josh

Related

Xpages Repeat Controls Tabular display

I have a situation wherein I need to display all documents in view. Issue is I need to display multivalued fields (can be achieved by modifying view column to display new line). Now issue comes when a column value is also multivalued. E.g. first column is created by looping through 50 fields (single value) and second column is created by looping through corresponding 50 fields but these fields are multivalued.
I am looking for ideas about how to nest repeats in this case. Issue is in first repeat I get the handle of documents but in nested one i am not able to get this handle to be able to loop through fields. And it is not simply one column or value I want to display, there are 4-5 such columns.
Any ideas are welcome.
Thanks in advance.
You want to start looking at a repeat control, not a view control. Have the outermost control loop through the entries in the view and populate the data source of a containing panel with a Notes document. Then inside the panel you only refer to the inner document data source.

form view in excel for a record

I have a sheet in excel that is basically like a database (yes it has to be in excel unfortunately) and I want to design a simple form to display the records (the different column values in the rows). Usually MS is good with making widgets to do this but I cant seem to figure out how to write it in VBA (easily)
Basically I have a list of Names and ID#'s then some other columns that need to be filled in (address, order # etc) but I'd like the user to do this via a form rather than typing in excel. I created a small form in VBA, but now I cant link the columns to the textboxes in the form.
Anyone know of any code I can plug and play to do this.
Specifically I am using a ComboBox (for the list of names) and then a for loop searching through it to find the selection and updating data. But its a real pain.
plus I cant figure out how to put in a 'Next' button, which is really annoying me. Does anyone know how to change the comboBox value to the next row, if it is linked via RowSource
Have you considered the Form feature? You can find under the commands you can add to your QuickAccess toolbar.
Check this helpful tutorial for additional details.

How to specify the width of site column in a list?

I have developed a list in SharePoint. While entering new item in it, like name, if I keep on typing it gets spread over a line making the width of cloumn spread over page. I want to limit the width of site column so as the column's value spreads over multiple lines instead of spreading over one. How can I do this setting?
This is not a setting you can configure in SharePoint. You will need to write some custom code using css and possibly javascript that will set the width of the column. You can make a change like this in SharePoint Designer.
You must use min-width (CSS) in your block.
You have to create custom XSLT for this. There you have loop all the column and need to specify the overflow:auto, hidden,.. CSS property. So it automatically get effect based on your internal name of the field.
So whereever you have the field it automatically get affected. If it for one single view you can use JavaScript to achieve this but this is not right way to do.
The data you are entering can be displayed in many ways. Today in a table format, tomorrow in a dropdown etc. You should distinguish between:
limiting the amount of data that can be entered in a site column (can be done in SharePoint alone, when you design your list)
limiting the wrapping of the words in a table cell today or trimming the values in a dropdown tomorrow (can be done using HTML/CSS "nowrap" if you display the list values in a browser app, or differently if you show the values in a WinForms app)

MOSS 2007 filtering a list ONLY if filter specified

Hi I have a sharepoint list that I want to filter based on text in the title, I want to beable to do a "Title contains" filter rather than an exact match, so I have gone to SPD and added a text box and go button to a page that contains the list. I have connected the 2 via a parameter and filtered based on that in the web part. This all works great
BUT..... When the page is initially shown the list is blank because the filter is blank and that doesn't match any Tiotkes in the list.....
What I'd really like to be able to do is show the entire list if the parameter is blank and opnly apply the filter if there is some text in it but I cant for the life of me figure out how to achieve it.
Any help would be really appreciated.
Thanks
In This case you would have to tweak your xsltto handle a default condition and create a default value for the parameter. If you want complete solution please paste your data view webpart xslt here

Can I change the column that links to the item with edit menu in a sharepoint list?

There was a similar question asked but it wasn't exactly what I am trying to do.
Here is a link to the question: Auto Number Column in SharePoint List with Link to Item
Two solutons were offered to that question.
Could either of these solutions work for an imported list I have where Sharepoint has decided which column links to the item with edit menu? I want to change which column does this as I need to change the format and this means removing the column that has defaulted to being the link to item with edit menu.
You cannot dynamically change the menu column OOTB in SharePoint. To "move" the menu to a different column, you should create a new computed column and wrap the rendering (DisplayPattern) with the _EditMenuTableStart and _EditMenuTableEnd fields.
To see an example of how to do this, take a look at the "AddMenuColumn" PowerShell script from the iLoveSharePoint project on CodePlex. The script is pretty straightforward, so you should be able to translate it into code if you need that (or add declarative using features).
You could also just use the script as it is, to add the new menu column to your list.

Resources