I have a document library that I want to create a custom view for. The
documents in this have file names that contain important information in them
that includes things like state and phone number. I'd like to create several
columns in the view that break up the filename using the mid function.

The issue I'm having is that it doesn't seem that I can create a column that
is a calucated column based on the name of the file. I can select Title in
the UI, but the title column is not populated in this particular document
library.

Is there any way to use the mid function to parse the name column of this
document share?

RE: create a calculated column based on filename in a list by lukezhan

lukezhan
Tue Aug 15 21:45:05 CDT 2006

------=_NextPart_0001_23744005
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hello,

There is a limitation here. We cannot use the file name as base column in a
Calculated coulmn. For document library, if we create a Calculated coulmn,
the base columns are only: Title, Comments and ID.

Regarding the issue, I suggest you may add customized text columns to the
dcoument library, and reminder user to inout state and phone number when
you are save a document or upload a document in the document library.

If you have any concern or further question on this issue, please feel free
to let me know.

Sincerely,

Luke Zhang

Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.


------=_NextPart_0001_23744005
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit

{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\lang2052\f0\fs20 Hello,
\par
\par There is a limitation here. We cannot use the file name as base column in a Calculated coulmn. For document library, if we create a Calculated coulmn, the base columns are only: Title, Comments and ID.
\par
\par Regarding the issue, I suggest you may add customized text columns to the dcoument library, and reminder user to inout state and phone number when you are save a document or upload a document in the document library.
\par
\par If you have any concern or further question on this issue, please feel free to let me know.
\par
\par Sincerely,
\par
\par Luke Zhang
\par
\par Microsoft Online Community Support
\par ==================================================
\par Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifications.
\par
\par Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx.
\par ==================================================
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par
\par
\par }
------=_NextPart_0001_23744005--


Re: create a calculated column based on filename in a list by jeremysimmonsis

jeremysimmonsis
Wed Aug 16 12:21:30 CDT 2006

Brian,

Have you considered writing an event handler for the Library to handle
events to replicate filename to the Title field, so that a calculated
field could be created from the Title field?

I had the same problem.

We were using a InfoPath form library where the filename was
"FooBarForm-YYYY-MM-DDTHH_mm_ss", basically the name of the form, and
then the UTC date. like this one 2005-12-25T16_30_00 which is about
half past 4 in the afternoon on christmas day, 2005.

This was great, because submitting to the form library via infopath was
automagically going to give us a unique filename. (we're exagerrating,
because a user really 'could' submit something at the same time as
another user within 1 second) It's not a heavily used form, otherwise
we would have generated a GUID.

That said, we created a event listener for that library, to handle the
create and modify actions of the file, and pushed the filename into the
Title field.

Of course, the edit should never be an issue, because it always happens
at create time.

Either way, it worked for us. Your mileage may vary. It's an ugly dirty
work-around, and something in my opinion that shows that WSSv2 is still
an early product and lacks a robust feature set.

Cheers,
Jeremy Simmons
http://jeremysimmons.net/

Brian Hman wrote:
> I have a document library that I want to create a custom view for. The
> documents in this have file names that contain important information in them
> that includes things like state and phone number. I'd like to create several
> columns in the view that break up the filename using the mid function.
>
> The issue I'm having is that it doesn't seem that I can create a column that
> is a calucated column based on the name of the file. I can select Title in
> the UI, but the title column is not populated in this particular document
> library.
>
> Is there any way to use the mid function to parse the name column of this
> document share?