Set a dynamic Item with a WorkFlow in SharePoint

Hi ,
I want to set the fields in a Hyperlink column called Dependencies based on values of another fields in the same list.
I'm using a workflow like this created in SP Designer:
Stage 1
Set Workflow variable
(URL) to value ("http:www.example.com/[%Current Item: Title%].[%Current Item:Version%]")
</small>
then Set field  (Dependencies ) tovalue
(URL)
Transition to Stage
Go to  End of workflow
I published my workflow over the list and also I marked that it should be automatically started when an item is change or it's created , but nothing happens in
Dependencies column. What am I doing wrong?

Hi,
According to your post, my understanding is that you wanted to open hyperlink in another tab /window.
The workflow can only change the URL in the href. We need to add target='_blank'
into the <a href='URL' >
The result is <a href='URL' target='_blank'>
We can add Hyperlink column named Hyperlink and then create workflow to set the value of the hyperlink filed.
We can use JSLink to achieve it.
Save the following code as a .js file(like HyperlinkFieldTemplate.js)
(function () {
// Create object that have the context information about the field that we want to change it output render
var linkFiledContext = {};
linkFiledContext.Templates = {};
linkFiledContext.Templates.Fields = {
"Hyperlink": { "View": linkFiledTemplate },
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(linkFiledContext);
// This function provides the rendering logic for list view
function linkFiledTemplate(ctx) {
var hyperlink="";
var url= _spPageContextInfo.siteAbsoluteUrl.split('/sites')[0]+ctx.CurrentItem[ctx.CurrentFieldSchema.Name];
if(ctx.CurrentItem[ctx.CurrentFieldSchema.Name]!=""){
hyperlink="<a href='"+url+"' target='_blank'>" + url+ "</a>"
return hyperlink;
   2. Upload the .js file into Document Library.
   3. Edit the list view page
   4. Edit the list web part. Go to Miscellaneous -> JS Link.
   5. Add the following URL into the JS Link textbox.
        ~site/Shared Documents/
HyperlinkFieldTemplate.js
Then when you click the hyperlink, it will be opend in another tab.
Best Regards,
Linda Li
Linda Li
TechNet Community Support

Similar Messages

  • SBO_SP_TransactionNotification, check status of open items with other sales

    Good morning,
    need help with a SQL to SBO_Transaction.
    I need to check the database (Table ORDR and RDR1) if there are items on other sales documents with the open status and must be for the same business partner of the document being entered.
    The scenario is, if a seller trying to include a sales document for a business partner of the same item that is already in another document of sale and that has not been met, the SAP can not allow.
    Includes the following SQL procedure SBO_TransactionNotification, but could not run at all.
    Does anyone know how to help me with this SQL?
    IF @object_type = '17' AND @transaction_type in ('A', 'U')
    BEGIN
    IF (SELECT COUNT (T0.DocEntry)
         FROM [dbo].[ORDR] T0 INNER JOIN [dbo].[RDR1] T1 On T0.DocEntry = T1.DocEntry
         where (T0.CardCode = @list_of_cols_val_tab_del AND
                     T1.ItemCode = @list_of_cols_val_tab_del AND
                     T1.LineStatus <> 'C') AND T0.DocEntry = @list_of_cols_val_tab_del) > 0
    BEGIN
         SET @error = 1
         SET @error_message = 'There items with open status in other documents of sale! Check!'
    END
    END
    When I change the values ​​with the code "@list_of_cols_val_tab_del" by inserting the values ​​of CardCode and ItemCode, can cause the SQL Server returns the correct value it should return in SBO_Transaction, the counter works, if there are open items for the same business partner , returns the counter value greater than zero of should give the message stopping the process, but within the SBO_Transaction SQL does not work.
    Thanks everyone!

    Hi,
    You may try:
    IF @object_type = '17' AND @transaction_type in ('A', 'U')
    BEGIN
    IF EXISTS (SELECT T0.DocEntry
         FROM dbo.ORDR T0 INNER JOIN dbo.RDR1 T1 On T0.DocEntry = T1.DocEntry
         where (T0.DocEntry = @list_of_cols_val_tab_del AND
                     T1.ItemCode IN (SELECT T2.ItemCode FROM RDR1 T2 INNER JOIN ORDR T3 ON T3.DocEntry = T2.DocEntry
              WHERE  T3.CardCode=T0.CardCode AND
                     T2.LineStatus = 'O' AND T0.DocEntry != @list_of_cols_val_tab_del))
    BEGIN
         SET @error = 17
         SET @error_message = 'There items with open status in other sale order! Check!'
    END
    END
    Thanks,
    Gordon

  • Set a Text Item

    Hi,
    I have a text item. I also have an application item.
    I want to set this text item with the value of the application item every time the page is redirected.
    Is thos possible????
    How do I do this?
    Plase suggest.
    Thanks.
    Edited by: machan on Feb 9, 2010 1:03 PM

    Machan,
    You should be able to set the Text item with the value of the Application item if Source Type = "Item (Application or Page Item Name)".
    Ittichai

  • Deleting a List Item with Very Huge Amount of Versions

    A faulty workflow flooded list items with 50K+ versions on SharePoint List. Attempts to open the list item/delete/edit via SharePoint UI/PowerShell failed! Programmatic iterations to delete versions/items trys to consume complete server memory and
    fails.
    Deleting the complete list is successful, but that results in SharePoint timer jobs fail and places Lots of Block in the database, which stops SharePoint sites from loading.
    Any help please?

    SP 2010 and 2013 support a max of 50,000 versions. Accessing more than 5000 items at a time causes SQL Server to escalate from row locks to table locks, which will generally bring SharePoint to a stop. You will need to write code that can bring back subsets
    of the data, and the only approach I can think of is a CAML query. But, I can't find any examples of working with versions using CAML.
    You could just change the Throttling settings in Central Admin from the default of 5000 to 50000 and then run your code during off hours.
    Mike Smith TechTrainingNotes.blogspot.com
    Books:
    SharePoint 2007 2010 Customization for the Site Owner,
    SharePoint 2010 Security for the Site Owner

  • Dynamic action with set value on date field

    Hi,
    I'm using APEX 4.02
    I'm trying to calculate the age based on the date of birth dynamically on a form. I'm trying to do this with a (advanced)dynamic action with set value.
    I'm able to get this kind of action working based on a number field etc, but NEVER on a date field.
    I've read all posts on this subject but so far no solution. Even if I try to simply copy the value over to another date field or typecast it to a string ( to_char function ) it does not work. So for me the problem seems to be in the source field being a date field.
    I've tried using the source value as is in a select statement :
    select :P33_GEBOORTEDATUM from dual;
    and also type casted based on the date format :
    select TO_DATE(:P33_GEBOORTEDATUM,'DD-MON-YYYY') from dual
    but still no luck.
    On the same form I don't have any issues as long as the calculation is based on number fields, but as soon as I start using dates all goes wrong.
    Any suggestions would be greatly appreciated. If you need any extra info just let me know.
    Cheers
    Bas
    b.t.w My application default date format is DD-MON-YYYY, maybe this has something to do with the issue .... ?
    Edited by: user3338841 on 3-apr-2011 7:33

    Hi,
    Create a dynamic action named "set age" with following values.
    Event: Change
    Selection Type: Item(s)
    Item(s): P1_DATE_OF_BIRTH
    Action: Set value
    Fire on page load: TRUE
    Set Type: PL/SQL Expression
    PL/SQL Expression: ROUND( (SYSDATE - :P1_DATE_OF_BIRTH)/365.24,0)
    Page items to submit: P1_DATE_OF_BIRTH
    Selection Type: Item(s)
    Item(s): P1_AGE
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • SharePoint Designer 2013 (2010 Platform Workflow) - How can I create a new list item with a SPECIFIC content type?

    In SharePoint 2010 I created workflows that used the 'Create list Item' Action, which then set the Content Type ID (so I could create documents of various types in a document library). 
    We just switched to the SharePoint 2013 platform, and now the drop down for Content Type ID is blank in all of the workflows that are still using the SharePoint 2010 platform.  Is there any way to create a list item with specific content
    type?  Even if I could just input a string into that field instead of using this blank drop-down.  Please help! 

    Hi Sarah,
    According to your description, my understanding is that you cannot create a new list item with a specific content type using SharePoint 2010 Platform Workflow.
    I tested the same scenario in my environment, and the Create List Item worked fine with the specific content type.
    How did you create the content type?
    Please check if the content type is added to the list/library the workflow associated with.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Dynamically create Variant Data Socket items with multiple writers

    I want to use variant or cluster items with data socket connection. I want to allow multiple writers.
    So far I can create these items dynamically but not set them to allow multiple writers.
    For numeric, string, and Boolean items I can set these properties by predefining them in the data socket server manager. I could not predefine a variant or cluster in the manager.
    I realize I can flatten to string the item needed but would prefer to do this in the cluster or variant formats.
    Any suggestions?

    unclebump wrote:
    Could you accomplish this using a functional global architecture??
    An interesting concept which might work and did just open up a new host of possibilities!
    When I get the time I might give this a try. I just did a quick test in another program.
    Through VI server I opened a reference to a remote machine. I then created strictly typed reference to a “functional global vi” that I knew would be in memory. It reads the functional global just fine!
    Thanks for the suggestion.
    Here is the work around I used for the data socket program.
    Here is the original problem.
    I needed to know on the server side when a new value was written to the message cluster, which consisted of a string and a variant. Checking the string portion of the cluster let me know what command to send the device being controlled on the server machine. The variant is used to hold the various parameters that accompanied the command. Since the same command type could be sent several times I needed to reset the string control after the server read the command. This required writing to the data socket from the client & server machine (multiple writers). Also since the client could be any PC in the subnet I needed to allow all these machines to have write access.
    I solved this by using a second data socket item for the new message flag. This item is a string value that could be pre-defined and set to allow multiple writers. I then used the cluster item to handle the commands and wrote to the string item a signal that a new command was ready. The server then recognizes a new command is ready, reads the command, and then flags the string message received.
    Thanks again for those who took the time to answer this.
    Randall

  • Display item with HTML affected by dynamic action

    Hi,
    I'm using APEX 4.1.1
    I have a item P1_TEST set as "Display only", escaping special characters "no", and the source as pl/sql expression of
    'hello <b>world</b>'I then create a dynamic action executing PL/SQL on click of a button.
    P1_TEST is listed in both "page items to submit" and "page items to return", and it doesn't matter what happens in the pl/sql code - it could just be null;
    When opening the page, I see
    hello world
    as desired.
    After clicking the button, the field contents become escaped and I see hello <b&GT;world</b>which is not desired.
    Is this expected behaviour / a bug? Is there a workaround?
    Cheers
    Scott

    Hi Scott,
    This was indeed a change of behaviour from 4.1.1 to 4.2 and has to do with how APEX handles input escaping (or when saving values into session state). I should say, we plan to revisit the current behaviour to make this more transparent and obvious, but that won't be for 4.2, for your information.
    As you identified, the escaping is happening as part of the 'Page Items to Submit' functionality, so in other words when the item value is saved in session state. APEX has some predefined rules about when and when not to do input escaping based on the item type, and this is what has changed slightly from 4.1.1 to 4.2.
    In 4.1.1, regardless of whether item values are set via the URL or via an Ajax call, the same rules applied for when APEX does input escaping. We always input escape the 'safe' item types. These types used to be documented in the 3.2 documentation, here: http://docs.oracle.com/cd/E14373_01/appdev.32/e11838/sec.htm#CDDBBECI
    (Obviously the item types have changed slightly with the consolidation of some of those into single items, with different settings. But hopefully that is still of use, and we no longer cite them in the same way in recent documentation so I couldn't link to something more recent.)
    In 4.2, this behaviour was 'relaxed' slightly, such that this logic only kicks in when setting values over the URL, not for Ajax calls. This is why this is no longer an issue with your DA, because we no longer obey the same item type escaping in the context of an Ajax call.
    As a workaround for 4.1.1, I would suggest to use a non-safe item type to set your value into (eg a 'Hidden' type), then use JavaScript just to copy that over to your displayed item. The 'unescape' function didn't work, because that does URL unescaping, not HTML unescaping.
    Hope that helps,
    Anthony.

  • Send Email with Contents of List Item (not from workflow)

    End users have requested the capability to email a single list item, with all its data (by which they mean the data they see in their view), to an address to be entered on the fly. In other words, they want an option in the ECB or ribbon where
    they would fill in a box with an email address (not necessarily a SharePoint user) and the contents of the selected list item would be sent out by the portals email, which is already configured.
    My searching has found similar solutions involving workflows, but nothing in the way of an 'on-demand' type of process. If this is something that needs to be developed, I am not afraid to jump in, but am hoping there might be something I can leverage already
    in place.
    I would appreciate any ideas on this.
    Echo Train Nashville TN

    Hi Echo Train,
    I would still look at using a Workflow for this. Easiest option to setup and maintain, and
    you can still enter an email (or multiple emails) on demand.
    For the List Workflow click on Initiation Parameters and add one with
    Field name of Email for example.
    Description (something like): "Please enter the email(s) you wish to send the list item information. Separate each email with a semi colon ;"
    Information type: Single line of text
    Default value: leave it blank
    Next add a Send an Email action with the following settings:
    To: Select from existing Users and Groups > Workflow Lookup for a User...
    > Data source: Workflow Variables and Parameters
    > Field from source: Parameter: Email
    > Return field as: As String
    Then setup your Subject and Body using the Fields from the Current List Item
    Save the Workflow then go back into the Workflow settings and ensure that: Allow this workflow to be manually started is the only option selected.
    Publish the workflow and your users should now be able to click on the Workflow with the ability to enter one or more emails.
    There are other options apart from using a Workflow such as setting up an Action with some ECMA script, but much more difficult to create and maintain, which in this instance I would still opt for the Workflow solution.

  • Set Column Default Value with Workflow

    How to set Column Default Values using a workflow.
    <input alt="Mark as abusive!" id="ctl00_m_g_e11f6e6d_9b4b_42d7_97fb_486623821166_ctl12_ctl03_abuseButton_710" name="ctl00$m$g_e11f6e6d_9b4b_42d7_97fb_486623821166$ctl12$ctl03$abuseButton_710" src="http://www.sharepointforum.nl/_layouts/images/TOZIT/SharePointForums/abuse/abuse.png"
    style="border-width:0px;" title="Mark as abusive!" type="image" />
    15 seconds ago
    After I add an item including metadata in a List, a Workflow starts to create a Library Folder with rootfolder, subfolder and sub-subfolder names based on the List first three column values. 
    I like that the unique created library subfolder automatically receives several additional List column values in its Column Default Value with that workflow.
    After done, documents added to this subfolder are automatically populated with Metadata from the parent Subfolder.
    Workflow standard function can be used  to populate the folder Column Value to this but not the Column Default Value.
    Does someone has a solution how to set Column
    Default Value using a workflow?
    I like to use such workflow in Sharepoint 2010.
    Thank in advance.

    Hi,
    I think it cannot be achieved by workflow.

  • We have an older IMac (preIcloud) and just purchased a new Macbook Air. Our Iphones are set-up to synch with the IMAC and my calendars on the IMac & the phone look the same. But when I open ICal on the MacBook Air my calendar is missing items? Help..

    We have an older IMac (preIcloud) and just purchased a new Macbook Air. Our Iphones are set-up to synch with the IMAC and my calendars on the IMac & the phone look the same. But when I open ICal on the MacBook Air my calendar is missing items? Help.

    Are you wanting to import iCal to the MacBook Air. Since iCloud doesn't work with 10.6 OSX you probably don't have any data in iCloud yet?

  • Problem with setting tooltips for items of a JCombobox

    hi guys,
    I want to set tooltips for items of JComboBox & the code that i have written is given below , but the tooltip text is set for all the items of Nonitindustrycombo but the tooltips remain the same even for Nonitdesgcombo's items.
    Is that we need to refresh the ComboboxRenderer every time ?
    I am not able to trace out the exact reason for this,please if anyone can suggest me something regarding this would be of great use to me.
    class Searchpanel extends JPanel {
    String[] str = null;
    public SearchPanel(){
    Nonitindustrycombo.addItem("--Select--");
    ArrayList NonITindus = ERPModel.getAllNonitIndustry(); //gets all the items(strings) for Nonitindustrycombo
    for (Iterator iter = NonITindus.iterator(); iter.hasNext();) {
    String str = iter.next().toString();
    Nonitindustrycombo.addItem(str);
    SetTooltip(Nonitindustrycombo,NonITindus);
    Nonitdesgcombo.addItem("--Select---");
    ArrayList desg = ERPModel.getAllNonitDesg(); //gets all the items(strings) for Nonitdesgcombo
    for (Iterator iter = desg.iterator(); iter.hasNext();) {
    Nonitdesgcombo.addItem(iter.next());
    SetTooltip(Nonitdesgcombo,desg);
    class MyComboBoxRenderer extends BasicComboBoxRenderer
    public Component getListCellRendererComponent(JList list, Object value,
    int index, boolean isSelected,
    boolean cellHasFocus)
    if (isSelected)
    setBackground(list.getSelectionBackground());
    setForeground(list.getSelectionForeground());
    if (0 < (index))
    list.setToolTipText(str[index - 1]);
    else
    setBackground(list.getBackground());
    setForeground(list.getForeground());
    setFont(list.getFont());
    setText((value == null) ? "" : value.toString());
    return this;
    private void SetTooltip(JComboBox combo,ArrayList arr){
    str = (String []) arr.toArray (new String [arr.size ()]);
    combo.setRenderer(new MyComboBoxRenderer());
    public static void main(String[] args){
    new SearchPanel();
    Thanks ,
    vishal

    1) You where given a working example in your last posting on this topic. Compare your code with the working code to see whats different and fix it.
    2) The code you posted doesn't compile.
    3) You didn't use the "Code Formatting Tags" when you posted your code so it not readable.

  • How to set background ChoiceBox item color to ChoiceBox with css?

    How to set background ChoiceBox item color to ChoiceBox with css?
    I need to change items list backgound color.
    I tried with following code, but it doesnt helps:
    .choice-box .context-menu {
      -fx-backgound-color: red;
    .choice-box .menu-item{
      -fx-background-color: red;

    In Java 8, either of your selectors should work.
    In Java 7 (JavaFX 2.2), you need the following workaround:
    #choice-box-menu-item {
         -fx-background-color: red ;

  • Forms 10g : How to set the Database Item property for an item dynamically ?

    Hello all,
    I have a requirement where I need to set the database item property of an item to TRUE/FALSE
    dynamically at runtime based on certain conditions.
    Earlier, in forms 6i I've used,
    Set_Item_Property (<item_name>, DATABASE_ITEM, PROPERTY_TRUE);
    But in Forms 10g it doesn't recognize this Database_Item property and gives a compilation error.
    Have I overlooked something or has this property become obsolete in Forms 10g ?
    If obsoleted what is the replacement property ?
    Regards,
    Sam

    Some options:
    1. Create a database-view, including the "real" column in databases where it exists and a "dummy"-column in databases where it doesn't exist.
    If that's not possible,
    2. set database="No" for your item and
    -- create a POST-QUERY-trigger which reads the data for that column from the database, if the column exists, and
    -- create a ON-UPDATE-trigger which includes an
    UPDATE_RECORD;
    UPDATE THETABLE SET
      THECOLUMN=thevalue
    WHERE  ROWID=:THEBLOCK.ROWID;3. Base your block on either a select-from-clause, a ref-cursor or a procedure to adjust he query-part,, for saving use a procedure.

  • Is it possible to query an Item with two or more conditions in OOB Update List Item WF Step

    In SharePoint Designer 2010, in Workflows, is it possible to give more then one condition when querying items? Let me explain, it is fairly easy to drop Update item in this list step, and say, for example, Update item with ID X. However, if is it possible
    to do something along this lines with OOB steps, Update an item in this list where Title is Equal to "abc" and Modify date no older then 3 days.
    Update: Workflow is started when the item is added to the list. What I would like is to update some fields on this item depending on information in this item and in external list. For example
    Current Item Field 1 has value "abc"
    Current Item Field 2 has value "123"
    Current Item Field 3 has value "456"
    External List has Item with value in Field 1 "123"
    External List has Item with value in Field 2 "abc"
    External List has Item with value in Field 3 "xyz"
    Update Current Item Field 3 with value "xyz"
    In short I would need following query - Update Current_Item_Field_3 with value from External_List_Field_3 where Field 1 is equal to Current_Item_Field_2 and Field 2 is equal to Current_Item_Field_1

    Hi,
    From your description, I understand you want to update list item with workflow based on two or more conditions.
    To resolve your issue, you need to use “If current item field equals value” condition. Use this condition to compare a field in the current item that the list or reusable list workflow is currently running on to a value. Values can be static text, dynamic
    strings, and lookups to variables, context information, or other SharePoint fields. And you can learn more about each condition by referring to the article:
    https://support.office.com/en-in/article/Workflow-conditions-in-SharePoint-Designer-2010-A-quick-reference-guide-d8e33ac7-9336-487f-a60b-388c4ea497ff?ui=en-US&rs=en-IN&ad=IN
    I assume your External List is called “ListB”, and Current List is called “ListA”, You can follow the steps below:
    1. Add “If current item field equals value" for condition that ListB Field2 equals to ListA Field1, then set the second condition “ListB Field1 equal to ListA Field2” as the “Find the List Item” in the “Lookup for Single line of text”
    as the screenshot below:
    2. Add “Update List Item” as the screenshot below for updating Current_Item_Field_3 with value from External_List_Field_3. In addition, you should set “Find the List Item” in “Lookup for Single line of text” same to the “Find the List Item” in step 1:
    In addition, if you have more conditions, you could add “If current item field equals value” condition, and you should set each “Find the List Item” in “Lookup for Single line of text” same to the “Find the List Item” in step 1.
    Regards,
    Rebecca Tu
    TechNet Community Support

Maybe you are looking for

  • Personal hotspot missing on iphne 4 after upgrading to IOS 5

    Since i upgraded my iphone 4 to IOS 5, the personal hotspot disappeared on the settings. can anybody help me how to fix this.

  • Citi EO office FAILURE

    applied for the Citi Simplicity card and was approved for sli of $1800, my lowest since the start of my credit journey. I want to turn it down but not sure. HELP

  • ITunes LP err-42003 50 Cent Before I self Destruct LP

    If you read my other post, I was getting err 5000 on the LP content of 50 Cent Before I Self Destruct,,,,,,Now i am getting this-- "There were problems downloading some purchased items. For more information on the items that could not be downloaded,

  • Connecting Using SSL Authentication Without Username and Password

    Hi, We're on RedHat Linux 4.0 using 10.2.0.3 (server/client). We're trying to figure out a way to connect to the database using instantclient and JDBC-OCI and SSL authentication without using a username or password. According to the documentation thi

  • FRM 92091 unexpected fatalerror in client-side Java code

    Hi to all .. I have a Forms/Reports Application in a form I have a Java Bean that get the username of the client PC In the Oracle AS 10g all work fine in a Weblogic I get the error FRM 92091 unexpected fatalerror in client-side Java code and in the d