Forcing created by field to use alias name

Hi,
How can I modify User Profile Service in SharePoint 2007, so that "Created by" field uses "domain\user" as opposed to fullname in the created by field or any hidden person field like "modified by".
Thanks

Hi,
Per my understanding, you might want to set default value for the “Business Unit” column by looking up to another list.
You can apply
JavaScript with Client Object Model to the NewForm.aspx page to meet your requirement.
A possible solution can be like this: When user opens the NewForm.aspx page of the current list, the custom JavaScript will be executed to get information about the
current user, then query the other list for the default value, set the value to the drop down list of the “Business Unit” column dynamically. The JavaScript can be added into a Content Editor Web Part and insert into the NewForm.aspx page.
The links below would be helpful for implementing this scenario:
About how to
select an option of drop down list using JavaScript:
http://www.imranulhoque.com/javascript/javascript-beginners-select-a-dropdown-option-by-value/
About
how to use JavaScript Client Object model to access SharePoint list:
How to: Create, Update, and Delete List Items Using JavaScript
http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx  
Common Programming Tasks in the JavaScript Object Model
http://msdn.microsoft.com/en-us/library/office/hh185015(v=office.14).aspx
Here are two links about how to
add code into SharePoint page via Content Editor Web Part:
http://blogs.msdn.com/b/sharepointdev/archive/2011/04/14/using-the-javascript-object-model-in-a-content-editor-web-part.aspx
http://sharepointadam.com/2010/08/31/insert-javascript-into-a-content-editor-web-part-cewp/
Best regards
Patrick Liang
TechNet Community Support

Similar Messages

  • Using alias name from view

    Can I create somehow a view like this one:
    CREATE VIEW clerk_view AS
       SELECT employee_id as ei, last_name as ln, department_id as di
       FROM employees
       WHERE job_id = 'PU_CLERK' ;and using this view with aliases, e.g.:
    select * from clerk_view where ln = 'Mickey';
    My Oracle database version is 11.2.0.3
    Best.

    Hi,
    lesak wrote:
    So can you tell me what I'm missing in above CREATE statement? Sorry, no, not without knowing exactly what you're doing. That's why you need to post a complete test script that people can run to re-create the problem. Except for the identifier LN, there's nothing wrong with the code you posted per se , but there could be millions of things wrong with how how you're trying to use it. Even if I could post millions of suggestions, you wouldn';t want to read them all, just to fond the one or two that apply to your case. So way exactly what your case is. Post a complete test script that creates and populates the table (if necessay), calls the view, tries to use the view, and gets the error.
    When I create view in the same way in production and use alias name, I've got following error: ORA-00904. Not everyone who wants to help you has all the error codes memorized. That's why you should post the complete error message.
    So Oracle don't know that my employee_id or other column have also alias name?!Sure, it will know the alias name. That's exactly what aliases are for.

  • Create a between filter using months names ...

    Hi, I need to create a dashboard filter using month names in a between statement for examples:
    From: January - To August
    the problem is when I do this the Obiee server made a filter by alphabetic order, so for the example the result will be nothing (because A is prior to J)...
    How can I solve this
    (My boss is in my neck and I have a family to feed...)
    Thanks in advance...

    Hi,
    mma as given you the solution which would be helpful.
    I can say workaround for this,what ever date parameter you want to convert to january....december
    you can make an alias of that column as said above and write the filter on that date with a sql statement example as follows
    select to_char(sysdate,'FMmonth') from dual
    same way you take your requirement as select to_char(*your_date_column*,'FMmonth') from your_table
    Hope it helps,
    Best Wishes,
    Kranthi.
    Edited by: Kranthi.K on Nov 9, 2009 10:56 PM

  • How to use Alias name in OData service in SAP HANA

    Hi,
         I need to change one column name with alias of another name in odata service definition or odata url running in rest client. I am trying to give alias name with as key in the service definition like sql query.
    ex:
    There is one table with column name of PRODUCT_ID. I exporting that table via odata service to SAP UI. In the UI i dont want the product id column as PRODUCT_ID. It should be ike "Prodcut". Like we are using in SQL example
    select "PRODUCT_ID" as "Product" from "producttab";
    But i can't use as key for alias name. So i am getting syntax error.
    I have tried in rest client also ie executing odata file in rest based service. But i got error only.
    If anyone knows about this alias name in odata service, Please help me to resolve this issue..

    Hi Thomas
         Thanks for your reply.
         Actually in odata service definition i am using attribute and calculation views only. But in some case from the model view itself i need to use some alias names to the UI through odata service.
         For example in attribute view i have some columns with name col1,col2... I am getting those columns in UI using  odata service, for particular col2 column i need to change column name as product. And i am using the same view as source of another odata service in that service i need to change that column name as productname.
         In that case i need alias name usage. So that only i am searching alias keyword in odata service.
         Is there any possibility to use alias names in odata service.

  • How to use alias name in where clause

    Hello,
    DECODE (item.inv_type,'OT', (DECODE (item.attribute2, 'STONE', 0, xfer.release_quantity1 * xfer.attribute10)
    'FG', (xfer.release_quantity1 * xfer.attribute10)
    ) matl_val
    In the above code matl_val is alias name i need to use that one in where clause as
    where matl_val > 0
    is this possible or anyother way can anyone help me.

    But the point is as you haven't read the documentation you may miss some valuable points about alias and will soon end with another problem.
    >
    Specify an alias for the column expression. Oracle Database will use this alias in the column heading of the result set. The AS keyword is optional. The alias effectively renames the select list item for the duration of the query. The alias can be used in the order_by_clause but not other clauses in the query.
    >
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/statements_10002.htm#SQLRF01702

  • Accessing field values using property names

    Hi all,
    I have the following problem:
    I have several hundred simple beans which act as value holders:
    public class MyBean1 {
    private String field1;
    private String field2;
    Getters
    Setters etc.
    Now I have a class which receives the MyBean1 class encapsulated in an Object. I also have access to a list of propertynames i.e. field1, field2 etc.
    Having that info is it possible for me to retrieve the values from the bean without actually instantiating it in my implemantation class.
    I was thinking in the direction of something like a Factory helper class or so but wasn't quite able to figure out how to go about it.
    Any help would be appreciated.
    Regards
    Michael

    >
    Having that info is it possible for me to retrieve the
    values from the bean without actually instantiating it
    in my implemantation class.
    This does not make sense to me. If an object is not instantiated, then it does not exist nor do any of its fields. The operation of obtaining values that do not exist is undefined.
    I think you must mean something else but you need to explain it better.

  • Can we use alias name in the case statement?

    select sal,
    case sal
    when 500 then 'low'
    when 5000 then 'high'
    else 'medium'
    end case
    from emp;
    OUTPUT
    sal    case
    4587 medium
    5000 high
    .....so  can i have range in the place of  case  at output?

    select nvl(sal,0) sal, case when nvl(sal,0)<=500 then 'low' when nvl(sal,0)>=5000 then 'high' else 'medium' end range from emp;
    Output
    SAL RANGE
    450 low
    5000 high
    300 low
    4000 medium
    3700 medium
    4750 medium
    2000 medium

  • Created By field shows display name.

    Hi,
    I have a SharePoint list and the created By Field exports as Display name when I export to excel. I would like to auto -populate a field in the SharePoint list that will auto populate the Field with display name of the field when an item is created.
    How can I make this possible?
    Thanks,
    techie

    hi
    you need to use JavaScript code for the same.
    <script src="/my/Style%20Library/jquery-1.11.2.js"></script><script language="javascript" src="/my/Style%20Library/jquery.SPServices-0.6.2.js" type="text/javascript"></script><script language="javascript"
    type="text/javascript"> </script> ​​​​ 
    <script language="javascript" type="text/javascript">
    $(document).ready(function() {
    var userName= $().SPServices.SPGetCurrentUser();
    $(".sp-peoplepicker-initialHelpText.ms-helperText").text("");
    $(".sp-peoplepicker-topLevel").val(userName);
     $(".sp-peoplepicker-topLevel").text(userName);
    </script>
    http://www.enjoysharepoint.com/Articles/Details/auto-populate-current-logged-in-user-name-in-sharepoint-2010-20799.aspx
    http://www.enjoysharepoint.com/Articles/Details/auto-populate-current-logged-in-user-name-in-sharepoint-2010-20992.aspx
    or set column deafault value as [Me]
    http://sharepoint.stackexchange.com/questions/118932/sharepoint-2013-auto-populate-person-column-in-list-with-creator-name
    Rajendra Singh
    Walking on water and developing software from a specification are easy if both are frozen
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • SQL query - Alias name (value) as parameter to an Oracle function

    Hi,
    I have a sql query something like
    Select tbl1.valueA, tbl1.valueB, tbl2.valueX, MAX(CASE tbl2.valueY = 'XX' THEN tbl2.valueZ END) AS "ValueZ header", Function(tbl1.valueB, tbl2.valueX, "valueZ header")
    FROM table1 tbl1
    JOIN table2 tbl2 ON tbl1.id = tbl2.tbl1id
    WHERE ...
    my problem is that I need the value from MAX statement as parameter to the function and I have tried to use the alias name (valueZ header) but this is not working. I guess because of some syntax error. Can I use alias name as parameter into the function at all - if - how should I do this?

    Hi,
    user8819407 wrote:
    Hi,
    I have a sql query something like
    Select tbl1.valueA, tbl1.valueB, tbl2.valueX, MAX(CASE tbl2.valueY = 'XX' THEN tbl2.valueZ END) AS "ValueZ header", Function(tbl1.valueB, tbl2.valueX, "valueZ header")
    FROM table1 tbl1
    JOIN table2 tbl2 ON tbl1.id = tbl2.tbl1id
    WHERE ...
    my problem is that I need the value from MAX statement as parameter to the function and I have tried to use the alias name (valueZ header) but this is not working. I guess because of some syntax error. Can I use alias name as parameter into the function at all - if - how should I do this?You can use a column alias in the ORDER BY clause of the same query where it was defined, but that's the only place where you can use it in that query.
    You could repeat the entire MAX (CASE ...) expression as the 3rd argumnet to your function, or you could compute it once in a sub-query, then reference the column alias as often as you like in the super-query, like this:
    WITH     got_valuez_header     AS
         Select  tbl1.valueA
         ,     tbl1.valueB
         ,     tbl2.valueX
         ,     MAX ( CASE
                            WEHN  tbl2.valueY = 'XX'     -- Don't forget the keyword WHEN
                      THEN      tbl2.valueZ
                    END
                  )          AS "ValueZ header"
         FROM         table1     tbl1
         JOIN         table2     tbl2     ON     tbl1.id     = tbl2.tbl1id
         WHERE          ...
         GROUP BY     ...
    Select  tbl1.valueA
    ,     tbl1.valueB
    ,     tbl2.valueX
    ,     "ValueZ header"
    ,     Function_x ( tbl1.valueB     -- FUNCTION is not a good name for a function
                 , tbl2.valueX
                 , "ValueZ header"     -- Case-sensitive
    FROM    got_valuez_header
    ;

  • Tutorial:  Creating, saving and re-using Custom Shapes

    I've beeen experimenting with custom shapes for the last couple of days, and thought I'd share some of the tips and techniques I found.
    First of all, what are custom shapes?
    Well, they're vector objects.  That means that they are not built out of millions of individual pixels (like images are), but rather they're a series of mathematical statements that describe how to draw a line from point to point to create the vector shape.  This means that custom shapes are "resolution independent", and that they can be grossly shrunk or enlarged and still retain razor sharp edges, curves and corners.
    What are custom shapes good for?
    Pretty much anything where you want to use a good, sharp object.  In particular, using a custom shape as a clipping mask for an image that's been placed as a Smart Object is an outstanding technique, and really shows off the power that PSE is capable of.
    PSE comes with a lot of ready-to-use custom shapes for its Custom Shape tool, and there are probably hundreds of thousands available on the Web -- just search for "photoshop shapes".  Typically, those shapes will be supplied as Adobe CSH (Custom SHape) files, and simply copying the CSH files into the
    "C:\Program Files (x86)\Adobe\Photoshop Elements 10\Presets\Custom Shapes"
    directory will make them available for use with the Custom Shape tool.
    Sooner or later, though, you'll get the itch to create your own custom shapes.  Out of the box, PSE does not have the capability to let you create custom shapes and add them to the CSH files like the "big" Photoshop does, so we'll need to use a workaround:  store your custom shapes as layers in a PSD file, and when you want to use them simply copy them into your image. 
    N.B.:  To create custom shapes you'll have to use the reasonably priced Elements+ add-in:
    http://elementsplus.net/
    So, the procedure goes like this:
    Create a new image, using the PSE defaults, and save it as "CustomShapes01.psd", keeping it open.
    Open an image containing an object that you want to use as a custom shape.
    Use any of the selection tools to make an accurate selection of the object:
    In the Effects panel, use the Elements+...Paths effect and choose the Create New Path...From Current Selection:
    Use the Elements+...Paths again, choosing "Convert to Shape", giving it a name and colour of your choosing.  This will create a Shape Layer using that name.
    Important:  If your shape has "holes",
    use the Shape Selection tool and click on the shape to select it.  Then hit the "Combine" button in the Options Bar.  This will combine all the individual shapes used to create the shape and its "holes" into one shape, and prevent beaucoup problems later.
    Switch to the Move tool and drag the shape onto the tab of your "CustomShapes01.psd" image, keeping your mouse button pressed.  That image will become activated and you can move your cursor onto the image itself and drop your shape onto it.  Your PSD file will now have your custom shape as a shape layer:
    Save that "CustomShapes01.psd" file.
    You can repeat the process for as many custom shapes as you want, and they will each become a layer in the "CustomShapes01.psd" file.
    To use your custom shape, open the "CustomShapes01.psd" file and your target image and do the drag and drop with the Move tool to copy the custom shape onto your target image.
    I mentioned that using a custom shape as a clipping mask for an image placed as a Smart Object is a very powerful technique.  It's powerful because the custom shape can be altered at any time and still keep its sharpness, and because the Smart Object can also be resized without becoming pixellated.  Of course, that custom shape layer can have any number of layer styles applied to it and those layer styles will "follow" the shape if the shape is moved, resized or rotated.
    Here are three examples of using the custom shapes as clipping masks for Smart Objects:
    In this example, each custom shape is used as a clipping mask for an image Smart Object, as usual:
    Here, one custom shape was used as a clipping mask for an image Smart Object and they were linked. 
    Then the shape and image were duplicated and moved, rotated and resized.  Because of the linking, the Smart Object automatically kept its orientation and size relative to the custom shape throughout:
    If you want to use custom shapes as a "combined" clipping mask, the procedure is a little more complicated because you need to get all your custom shapes on one shape layer. 
    So, after copying your shapes into the target image (as separate shape layers), use the Shape Selection tool to select one of the shapes.  Using Edit...Cut will cut that shape layer to the Clipboard, and you can select one of the other shape layers and use Edit...Paste to paste the custom shape into that shape layer.  Repeat as necessary, and you will get all of your custom shapes on one shape layer.  Then use that single shape layer as your clipping mask:
    The neat thing is that the individual shapes can be selected with the Shape Selection tool and independently moved, resized or rotated as necessary.
    Enjoy!
    Ken

    Thanks, Michel.
    I forgot to mention one point about copying shape layers into one shape layer:  when you initially use the Shape Selection tool to select a shape for cutting, make sure the option for the Shape Selection tool is set to "Add to Selection".
    MichelBParis wrote:
    The problem with Elements+ is that it has so many features you soon forget what it can give you !
    Truer words were never spoken! 
    Ken

  • Problem in using table name dynamically in PL/SQL

    I tried to create a procedure to use table name dynamically and got the following error. Anything wrong with my procedure?
    NFADV>declare
      2   cnt number;
      3   cursor cur is select table_name from user_tables where table_name in ('EMP','DEPT');
      4  begin
      5   for c1 in cur
      6   loop
      7    execute immediate select count(*) into cnt from c1.table_name;
      8      dbms_output.put_line('Count is : '||cnt);
      9   end loop;
    10  end;
    11  /
    declare
    ERROR at line 1:
    ORA-06550: line 7, column 21:
    PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( - + case mod new not null <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    <an alternatively-quoted string literal with character set specification>
    <an alternatively-quo
    ORA-06550: line 8, column 5:
    PLS-00103: Encountered the symbol "DBMS_OUTPUT"
    ORA-06550: line 8, column 45:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    . ( , * % & - + / at mod remainder rem <an identifier>
    <a double-quoted delimited-identifier> <an exponent (**)> as
    from into || multiset bulkThanks and Regards
    Kaustubh

    Hi,
    The wrong part is in execute immediate, it should be as follows:
    execute immediate ('select count(*) from '|| c1.table_name)
    into cnt
    (not tested)
    Regards
    AK

  • Will SSO accepts "Alias name" in bakend system  through portal?

    Hi All,
    Our issues comes here.... Our client user ids are different from backend user ids...let's say.. <b>pradeep.venkat</b> in portal and <b>pradeep</b> in R/3. we want to use microsoft ADS as LDAP. if i want to user SSO deftly the user names must be same..or i need to make reference system.
    My question is:
    Whether SSO accepts "Alias name" in backend system(<b>Pradeep</b> as <b>pradeep.venkat</b>.
    If yes then what all the services of ITS which needs to be activated?
    how to integrate portalw with R/3 using Alias name when sso is active?
                          <b>OR</b>  
    Is there any possibility of using usernames as alias names in ADS(LDAP).
    Ur suggestions are highly appreciated with rwds points..
    Does this issues occured any where...with anybody...
    rgds
    pradeep

    The ADS admin can add a SAP entry to the schema which can include user name in the different systems such as BW, R/3, etc. This can then be populated by the admin or user to include the different logons and passwords in each system. Modifying the schema is not what they like to do but the hassle of syncronizing the users logon to the NT logon is more then your end uses can handle. I know because I had to do it once. It took months for everything to settle down. See notes 608781, 386762. These should explain the proccess.
    Please award points if this was helpfull.
    Greg

  • Using Alias for the table column

    Dear all,
       Can we use alias name for the table column while developing zreport.
    ie.,
      without using standard  table column name ( like mara-matnr ), i wish to use mat_num for matnr. So that, one can easily understand the column.
    Could you help me out in this regard.
    Thanks in Advance,
    S.Sridhar.

    yes you can declare in ur internal table like
    material_number like mara-matnr.

  • Problem using alias field names in a sql query

    Hello,
    I have a question regarding a simple Oracle database SQL query writeup:
    In the following (badly written but properly working) SQL query:
    Query 1:
    select
    soe.field1,
    (soe.field2 + soe.field3) as field4,
    (soe.field5 - (soe.field2 + soe.field3)) as field6,
    (select comp.parValue*soe.field7
    from
    CompTable comp) as parValue,
    (select soe.field8 - (comp.parValue*soe.field7+ soe.field9)
    from
    CompTable comp) as field10
    from
    SomeTable soe
    PROBLEM 1:
    I am re writing the code (soe.field2 + soe.field3) to get the alias field4 or column name field4 that I have created on the fly in the previously for use with the following fields. Can't I rewrite the query as follows. There is something simple missing!
    Query 2:
    select
    soe.field1,
    (soe.field2 + soe.field3) as field4,
    soe.field5 - field4 as field6, <<< field4 does not work here
    (select
    comp.parValue*soe.field7
    from
    CompTable comp) as parValue,
    (select
    soe.field8 - (comp.parValue*soe.field7+ soe.field9)
    from
    CompTable comp) as field10
    from
    SomeTable soe
    PROBLEM 2:
    Similar to the above problem, I was thinking to get a field parValue out of the CompTable table and re-use many times rather than the code shown in Query 1:
    Query 3:
    select
    soe.field1,
    (soe.field2 + soe.field3) as field4,
    soe.field5 - field4 as field6,
    soe.field7* (select comp.parValue from CompTable comp) as parValue1,
    soe.field8 - (parValue1*soe.field7+ soe.field9) as field10      <<<< parvalue1 does not work here
    parValue1*soe.field9 as TaxCondition               <<<< parvalue1 does not work here
    from
    SomeTable soe
    See that the query becomes so simple, but the above query does not work. There is something fundamentally wrong in my usage of the alias field names in creating other fields. The Query1 seems to be the only working option but its very slow as I am redoing and re-writing the whole code again and again to get the parValue field out of the CompTable table for use to create many other fields.
    I will appreciate if you can guide me in the right direction on this issue.
    Thanks and Regards
    Rama

    SELECT tmp.contract_no, tmp.Actual, tmp.Actual - tmp.NbHours
    FROM ( SELECT t.contract_no, sum(l.hrs) AS Actual, (c.labour_hours * c.labour_progress_per) / 100 AS NbHours
    FROM TASK_DELEGATION t
    INNER JOIN COST_CODE c
    ON t.cost_code = c.cost_code AND t.contract_no = c.contract_no AND t.is_inactive=0
    INNER JOIN Labour.dbo.LABOURALLOT l
    ON l.contractNo = c.contract_no AND l.costcode = c.cost_code AND l.pm = 'N'
    GROUP BY t.contract_no, c.labour_hours, c.labour_progress_per
    ) tmp

  • Creating fields as LOV (using alternate names) on OTL timecards

    Hi,
    I would really appreciate if someone can help me understand the process of being able to add fields on OTL timecard as LOV fields using alternate names. These are COST segments which I need to add on OTL timecard. The part which is most confusing to me is modifying the .ldt to get these fields working.
    Appreciate if anyone can point me to related documents.
    Thanks,
    Maddy
    --

    Hi Maddy
    Ramsys has pointed you towards a very useful document, the timecard configuration guide. But, the guide is very complicated and it shows you what to do, but doesn't really explain 'why' you have to do it.
    I run training courses on OTL, and this is a complex area to understand. It is possible to display almost anything on the timecard if you put your mind to it! Your example fo the cost centre is quite straightforward. Youi can create a value set to display the cost codes you want. A suitable one might already exist. You then need to have a view object (VO) to use this on the timecard. OTL provides 10 dummy VOs which you can use. The guide explains how to do this. The VO links your value set to the timecard. This step accounts for displaying the data on the timecard.
    You also need to have somewhere to store the values selected by the user. To do this you need to define a contect in the OTL_INFORMATION_TYPES DFF to store the data. You will also need to have a mapping component to link the data on the screen to the OTL_INFORMATION_TYPES context. Usually, you can use an existing mapping component.
    Good luck!
    Regards
    Tim

Maybe you are looking for