Calculated Field to return a text value

I'm trying to create a calculated field that will hit on keywords in folder names and return a value based on the keyword found. Obviously the folder name is contained in the "Name" field on my sharepoint site but how do I write a formula that
will look for a specific word or phrase and return an assigned text value?
Example: Name field contains a list of folders (see the name list below). I want the formula to search for "AAA" and return value "XYZ", I want to search for "BBB" and return value "ABC",and I want to search
for "CCC" and return a null field.
Name
Folder AAA Z
Folder BBB Z
Folder CCC Z
So we're all clear what I'm up against; right now I have a total of 45 folders (soon to be more) that I want to cut down to 5 or 6 after grouping by the returned value generated by the calculated field. I have zero experience and I'm not a formula or a code
guy. I've spent quite a few hours so far but I'm getting nowhere.

Hi DKeller33
I'm gladyou were able to get it working with content types but if the calculated column
allows less hands-on maintenance I am guessing you'd probably prefer to use
that solution. So I'd like to take one more stab at it if you will bear with me
For your case, I created a new document library so I could test out the calculation.
By default there were a number of columns created.
One of them was the "Name" column which is also a hyperlink ( I beleive this is the column you are trying to use for the calculation)
There is also by default a column named "Title"
I used the "Title" column for my example because it is the same text as the folder's "Name" Column
I created a calculated field called "Calculated Group"  and
added the calculation
=IF(ISNUMBER(FIND("AAA",Title)),"XYZ",IF(ISNUMBER(FIND("BBB",Title)),"ABC",IF(ISNUMBER(FIND("CCC",Title)),"","Next nested if")))
The calculated column then returned the appropriate grouping as a string so you can group or filter by it.Please let me know if you get it to work or let me know that I'm just spinning my wheels and I will stop trying.
Have a Great New Year! I hope SharePoint brings you good tidings!
Alex

Similar Messages

  • Select to return a text value instead of a boolean value

    Hello,
    it's been a long time since i did some SQL queries on MS Access, but i forgot how to do to return a text for each row (as field value) when a table field contains "1" as value ?
    for example i have a table named "products" with a field/column called "promotion". Sometime a product is promotional, so in this case, the "promo" column holds "1" as value.
    during a select on products table, how can i do to return "in promotion" (e.g.) if the column "promo" holds "1" for a product ?
    thx.

    Best case scenario would be to have a lookup table of values that match with a descriptive column, i.e.
    tblPromotionTypes
    Fields: fldPromotionTypeID (Numeric), fldPromotionTypeDesc (Text)
    tblProducts
    Field: fldPromo (Numeric)
    Select tblProducts.*, tblPromotionTypes.fldPromotionTypeDesc From tblProducts
    Left Outer Join on fldPromo = fldPromotionTypeID

  • Time Stamp not affected by change of calculated fields.

    Dear Experts,
    We have several calculated fields that are depended on values of lookup records or the system-time.
    I experienced during recalculation that when the calculated field changes the Time Stamp did NOT change. This change did also NOT trigger the workflow with Trigger Action: Record Update. AND the record is not Syndicated because the syndication map has Suppress Unchanged Records.
    Has anyone an idea how to solve this?
    Kind regards,
    Job Jansen

    Dear Kanstantsin,
    I don't know what you mean by "simple field" but I have 2 calculated fields one is Text and the other is Boolean. In both cases the Time Stamp is not updated during recalculation.
    Of course both fields are selected fields in the Time Stamp field.
    Kind Regards,
    Job Jansen

  • Not able to import Attribute Text Values in Taxonomy table

    Hi Experts,
    I have an excel file with 54K records of Attribute text values need to import in to taxonomy table. my excel file has 3 fields like ID, Name, Text Values. While mapping the fields in feild mapping grid, I have mapped ID field with Attribute Alias, Name with Attribute name, Text Value with Text Value and clone field of Text Value with [Text Value Remote Key]. Based on the field mapping I was trying to map values for ID filed with Attribute Alias field. Here I found Attribute Alias field has values in destination grid which were imported before for Attribute Name ID's in to the Alias field for attribute names.
    Here I found these values are different when I tried to map these values and the Value map buttons(Automap/Map/Add) were disabled.
    in the same way I tried with out maping the values for Attribute value id and selected the Attribute Alias field as value mapping field. but here in the import actions tab the records are active and disabled the import action option.
    so I have executed the import process, but no attribute text values were imported in to Taxonomy table.
    I am using the MDM 7.1 with build version 7.1.01.46.
    Please let me know if anyone came across this situation.
    Thanks,
    RDNPrasad

    problem solved

  • Copying a Calculated Field Value to another Field in the same List

    Hello! I have a calculated field that uses an if statement to determine a score. IE A field called Downtime Score contains this calculate:  IF Downtime Minutes =10, 100.  (not correct formatting, just basic to get point across)
    I simply want to use a workflow to copy the calculated value in Downtime Score (100) to another field called Final Downtime Score.
    In the workflow, I current have the following:  Set FinalDowntimeScore to CurrentItem:Downtime Score
    When I log both to workflow history, they both show 0 in history.  Nothing is copying.
    The calculated field is a number and I tried both number and text fields for FinalDowntimeScore.
    This is within SharePoint 2013 and using SharePoint Designer 2013.
    Any help would be appreciated!

    Ok, I did the same test as you and it failed.  I still return a 0 when I should see a 100.
    Not sure if this helps but when even though we are using sharepoint designer 2013, we only have "SharePoint 2010 Workflow" available in Platform type when creating workflows.
    Could you test again using SharePoint 2010 workflow as your platform type and see if you return the same results?
    Thanks!

  • Highlighting TEXT - not the field - and clearing the set value for a new one

    I have a form in which various text fields are set with a message to inform the user as to what kind of information I want typed in. My goals are:
    1. Have the text get highlighted so when the user starts typing, the "old" value gets replaced with the "new"
    2. Or, when the user tabs or clicks in the field all of the "old" value is deleted and they can start typing the "new" value from the beginning of the field.
    I am trying to eliminate having to manually highlight the field in order to type in the needed information. But each field needs to start with a value so the user knows what kind of information I am looking for.
    Does this make sense? By the way, I have no JavaScript experience...uh oh!

    Use the Media Manager (under the File menu bar item).
    Link:
    What Can You Do with the Media Manager?

  • How to change the column value which is coming from DO by a calculated field?

    Hi all,
    I want to change a column value based on my calculated field value. I have a column which is coming from DO which is based on External Data Source. I have a calculated field in my report. When there is any change in the calculated field then the column which is coming from DO needs to be changed. It means the DO needs to get updated when there is a change in the calculated field. Or like if the calculated field meets some condition then I need to change/update the same in the DO. This has to be done on the fly. the report should not submitted for this. when there is a change in the calculated column the DO column needs to get updated.
    Thanks,
    Venky.

    Ok, I've been a customer for very many years, I'm on a fixed retirement
    income.  I need to reduce my bills, my contract ends in  Dec. I will be
    pursuing other options unless I can get some concessions from Verizon.  My
    future son-in-law was given this loyalty plan, so I know this is a
    reasonable request.  My phone number is (removed)  acct number
    (removed)
    >> Personal information removed to comply with the Verizon Wireless Terms of Service <<
    Edited by:  Verizon Moderator

  • Dimension based on OLAP source returns text value not key value

    Hi,
    I have a Business Objects Universe based on a BEX query sitting on top of a BW datasource.  I imported the BEX query into Designer and several dimensions were created for me as well as several detail objects.  I was hoping the dimension objects created when pulled onto a Webi report would display the KEY value of the info object from BW, but unfortunately it appears to be pulling in the text value of the info object.
    Is there a way to change the default behavior so that the default dimension created will pull in the key value?
    Example:
    Universe dimension Object definition:  [ZCPCNTR].[LEVEL01]
    When pulled into a Webi report the MDX statement generated contains:  NON EMPTY [ZCPCNTR].[LEVEL01].MEMBERS DIMENSION PROPERTIES MEMBER_CAPTION
    Somewhere ".MEMBERS DIMENSION PROPERTIES MEMTER_CAPTION" gets added to the MDX statement.  I think this results in the Webi report displaying the text of the info object as opposed to the key value.  Is this modifiable?  If so what do I change to get it to display the key value?
    Thanks,
    Tim

    SAPBO786,
    Yes I do see the key value as a detail object under the dimension.  Do you kow of a way to change the default behavior so the dimension returns the key value?
    I have a bunch of reports (approx. 50) I built based on the dimension assuming the value was going to be key.  I don't want to go back and change all those reports if possible.  I am aware that I can take the Key detail object, change that to a dimension object and then modify my reports to pull that new dimension onto them, but I don't want to do that if there is a way to change the default behavior.
    Thanks,
    Tim

  • How to get key and text value of field "TNDRST" in VTTK from R/3 into BI

    There is one field call "TNDRST(Tender Status)" in SAP table VTTK in R/3. We can find  key value, but we are unable to find text for this field in VTTK. However we can see text value if we double click domain:TNDRST and go to value range.
    Questions, how to get key value and text of TNDRST together in BI. Do we need to create a master data source for TNDRST text information in R/3 and extracting into BI, if yes, how to? Are there any easy way to do it??
    Thanks,
    Sudree

    Hi Sudree,
    You need to create a generic Text Datasource to extract this information into BI System.
    1. Create a generic DS based on Table: DD07T
    2. The fields should be put in the extract structure.
              DOMNAME (Make this as Selection in the DS ) -
    Filter the Domain Name
              DOMVALUE_L -
    Key Value of Tender Status
              DDTEXT -
    Text / Description
              DDLANGUAGE -
    Language
    3. DD07T is the table with all the Domain names & their values, so in the Infopackage enter the Selection Value for DOMNAME as 'TNDRST' and then run it.
    Or you can create a view out of this table based on DOMNAME filter as 'TNDRST'.
    Regards,
    Chathia.

  • AJAX - How do we check if the response text returns a null value

    Hello,
    Could someone please help me with this issue?
    I am trying to disable a select box based on my responseText value.
    I need to check if my responseText is a null and disable my select if it is a null.
    Here is my code:
    if (xmlHttp.readyState==4)
              if(xmlHttp.status==200)     
              var getVal = xmlHttp.responseText;
              alert(getVal); //MY ALERT SHOWS A NULL     
              if(getVal == null) //but my null comparison fails
              document.all[ajaxBean.ajaxId2].disabled = true;               var valarray=getVal.split(",");
    else
                   for (var i=0; i < valarray.length;++i)
         var valarrayinner = valarray.split("|");               addOption(document.getElementById("secondBox"), valarrayinner[1], valarrayinner[0]);
    could someone tell me if its the right way to check for null value in responseText? or an alternative way to do the same
    Your help is appreciated!
    Thanks
    Priya

    Hello,
    Thank you for your promt response...I tried doing them as well. but nothing seems to work.
    It returns a length value of 1. It appears to be strange. I even tried to catch the null and set some junk text. When i try to check for the returned text again it returns a false.
    I dont know if this is the way responseText works. I tried setting a form variable but it doesnt do that too. Is there a specific way to check for the values in returned responseText?
    Thanks
    Priya

  • Using Calculated Field in Multi Value Field

    In Siebel Application
    Sales Order---> List
    There is a field call "Sales Rep" which displays an "USERID" of Order Sales Team Mvg Applet.
    But We want to display the Last Name and First Name (combined).We got the first and last name using calculated field (Active Full name).
    When I try to get the full name, the system display the name based on the "Primary position", if I step out of the particular row and come back again
    Is there any way to display the full name without step out any rows for Sales Rep field

    Your description is a little confusing. For performance reasons it is always best to set the use primary join on multi value links. This means that when multi value fields are displayed in applets they always show the primary by default. If you want to display something other than the primary what is your rational behind this and why not make the record you want to display the primary?
    Message was edited by:
    Richard@AXA

  • Adding field text values

    Hi,
    I am trying to add field text values to Nakisa i.e Personnel Area 01 but I want to display Personnel Area = England. I have found that the text values sit in a transparent table in SAP so I have downloaded it via the schema.
    How do I add these values to the appresources??? I can't see how they replace the numeric values???
    thanks

    A table join is the most efficient way but seeing as you already have your table an update statement will work. Something like this example should work for both Oracle and SQL Server:
    Update EmpDetailsCombined set EEGroupText = (select PTEXT from EEGroupTextTable where PERSG = EmpDetailsCombined.PERSG)
    I hope that helps! If you need more you should google your database type and the type of statement (update) - there is a wealth of knowledge on this subject all over the internet.

  • Invalid text value. A text field contains invalid data. Check the value and try again

    Hello,
    I am having a problem with the error mentioned in the title. I see alot of others have experienced the same problem, but I have quite a twist to it.
    I see the problem when I try to edit a list item, and then try to save the changes.
    Here what I see in the ULS log:
    System.Runtime.InteropServices.COMException: Invalid text value. A text field contains invalid data. Check the value and try again  
    at Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId,
    Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter
    pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)   
    at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean
    bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback,
    ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)
    I have 3 front end servers(fx wfe1, wfe2, wfe3).  And here is the twist.
    If I access the library directly through wfe1 and wfe2, I get the error. If I access the library via wfe3 if works just fine.
    So because of this, I think it is safe to assume that is has nothing to do with the character limit of 255. Nor does it have anything to do with the field type, since it is already set to mulitible lines of text.
    So. Any ideas?
    Regards,
    Michael
    mic

    Check if there is any change in web.config of these servers
    http://support.microsoft.com/kb/2880758
    To work around this issue, limit the length of the personal message in the invitation to 256 characters or less.
    This is a known issue. Microsoft is working to resolve this issue.
    http://social.msdn.microsoft.com/Forums/en-US/7bb16e51-e7cc-439e-a8b3-755683ccac1a/max-length-on-custom-field-types
    To solve the problem you may have to change the field's parent type to "note". To do that you have to open your fldtypes... file under Templates/xml and change the line to:
    "<Field Name="ParentType">Note</Field>" from "<Field Name="ParentType">Text</Field>"
    You might also have to add a sql type if your text needs to be longer than 255 characters
    <Field Name=”SQLType”>ntext</Field>
    and inherit from SPFieldMultiLineText instead of SPFieldText
    If this helped you resolve your issue, please mark it Answered

  • Remove 0 Value in Calculated Field

    I copied the below question for another post here as it asks the question perfectly.
    "I set up an invoice form to calculate totals from quantity x unit price. Every line has this formula, however the users may not have a priced item on every line of the form. My total column shows a $0.00 value until I input data. I'd rather have nothing show in that column unless quantity and price are entered. Is that possible?"
    However, and I apologize, but I don't understand the answer that was posted. This is the first time I've needed a calculated field -- and I've not done scripting in Acrobat before.
    Can someone walk me through the exact steps of how to enter and what to enter in the form to remove "0" values from the form?
    Thanks, in advance, for any and all help.

    Thanks, again, so much. I think I got it, the procedure that is! But, but the 0 is still there.
    This does now sound like a simple thing if you know the code. But apparently I'm not there yet!
    This is what I did.
    Under Advanced, Document Processing, JavaScript Functions.
    Entered two different scripts, as follows (this is exactly how I entered them):
    SCRIPT 1
    Name: ds_format
    Script:
    function ds_format()
    if (+event.value) {
    //$ format for nonzero values
    AFNumber_Format(2,0,0,0,"$",true);
    } else {
    //Don't show anything if result is zero event.value="";}
    SCRIPT 2
    Name: ds_keystroke
    Script:
    function ds_keystroke() {
    AFNumber_Keystroke(2, 0, 0, 0, "$", true);
    Then, under the calculated field properties (in my case, Total Cost),
    Format Tab, Custom Format, Custom Format Script section, I selected edit and typed in:
    ds_format();
    Ditto above, but under Custom Keystroke Script:
    ds_keystroke();

  • Display of calculated field value in same field using form personalization.

    Hi All,
    What could be the solution, if i want to have the formula on same display field.
    say..your entering value in grams and convert into ml in the same field of (:Q_RES.DISPLAY5)
    Conversion formula:
    (TO_CHAR(TO_NUMBER(:Q_RES_DISPLAY5)-(0.35))/((1.025)*(0.9986))/3)
    When I move out of THIS field, it should convert using above formula and store it in same field.
    Appreciate your efforts.
    Thanks a lot...

    What could be the solution, if i want to have the formula on same display field.
    say..your entering value in grams and convert into ml in the same field of (:Q_RES.DISPLAY5)
    Conversion formula:
    (TO_CHAR(TO_NUMBER(:Q_RES_DISPLAY5)-(0.35))/((1.025)*(0.9986))/3)
    When I move out of THIS field, it should convert using above formula and store it in same field.
    Appreciate your efforts.

Maybe you are looking for