Setting default value based on Link

I have a report with a link to a form. The link is a standard portal component link.
The link passes in cus_id.
I would like to set the default value of the form cus_id field to the cus_id value from the link when the form is presented in insert mode due to the expected situation where no record for the cus_id exists.
I have tried using the following function in default value:
NVL(portal30.wwpro_api_parameters.get_value('A_CUS_ID','LEVEL_TWO_FORM'),0)
I have tried both CUS_ID and A_CUS_ID, but neither seems to return a value.
Any suggestions are much appreciated!
null

I was able to reproduce this. The problem occurs because when referencing another page def (binding container) than the current one, this binding container needs to be "prepared" which is done by calling method refreshControl() on the binding container. For binding containers of parent groups, JHeadstart automatically prepares them as prat of the prepareModel phase of the current binding container. However, when clicking the AddRow button, this is too late, the default value expression is evakluated before the prepareModel phase.
A simple work around is to manually add the value binding "masterField" and its iterator binding to the page definition of the detail group. You can then use the expression "#{bindings.masterfield.inputValue} and that should work.
Note that in JHeadstart 10.1.3.3, we will add a "jhsPageDefs" managed bean that extends HashMap, which allows you to retrieve "prepared" binding containers. You can then use the expression
#{jhsPageDefs['MasterWizardGroupPageDef'].masterfield.inputValue}
Steven Davelaar,
JHeadstart Team.

Similar Messages

  • Pass variable and set default value based on user's group

    Hello
    I'm using SharePoint 2010 and SQL 2012. I need to send a variable to the page and based on its value, set default value for a drop down list and send it to other web part to filter the data. Is it possible for certain users to send that value as a default
    and limit user to see only this value in the text field or drop down list; for others - to allow to see the drop down list, but also set the default value for that list?
    The main page was designed in SharePoint designer, using web parts (aspx page). I had setup a connection to Active Directory and already have the code to get user's groups and based on their group, I have that variable pulled into the web page for further
    use. But I don't know how to pass that value as a default value to the web part (currently using SharePoint Filter web part). When I tried to set a default value for the web part - it automatically puts the quotation marks around the name of the variable
    and shows it as a text instead of showing the value of the field.
    Thank you!
    P.s. I have limited knowledge of SharePoint and need guidance (links, examples, recommendations)!
    Alla Sanders

    Thank you for your response. I'll try to give you more details. On PageA I check user's groups and based on the group, assign the value and pass it to the next page (no input from the user, all done behind the scene and user is redirected to PageB).
    On the next page I read that value and would like to send it to the SharePoint List Filter Web as a default value, as well as send it to another web part that displays the list from SQL, filtered using that default value. Ideally, if the user is from Group
    A, I'd like for them to have only one value in that drop down list; if user is from Group B - give him drop down list with 40 items to choose from. Below there is a part of the code and variable fnum has the value from PageA (if I print the value on the screen
    - I do see that it has correct value, so the code that gets groups from Active directory works correctly). If I assign fnum as a default value of the list, it shows "fnum" instead of the value of variable fnum. I connect to SQL database, using external
    content - so the other list that I'm filtering based on the value in that drop down list - is XSLT Data View Web part. I also have 2 more filters on that page, that user will have full access to and based on their input, it is also sent to the XSLT web part
    to filter out more data. Since one of the filters is the date and I am filtering data starting from the date that user chooses - XSLT is the only web part that I was able to make it work with.
    I looked at the link you provided (thank you). It is using Content Query Web part. Will it work with external content, as well as accepting multiple filtering, including custom starting date? I appreciate your help!
    <%
    string fnum = Request.QueryString["field1"];
    %><table cellpadding="4" cellspacing="0" border="0" style="height: 1000px">
    <tr>
    <td id="_invisibleIfEmpty" name="_invisibleIfEmpty" colspan="2" valign="top" style="height: 101px">
    <WebPartPages:WebPartZone runat="server" Title="loc:Header" ID="Header" FrameType="TitleBarOnly"><ZoneTemplate>
    <WpNs0:SpListFilterWebPart runat="server" FilterMainControlWidthPixels="0" RequireSelection="False" ExportMode="All" PartImageLarge="/_layouts/images/wp_Filter.gif" AllowHide="False" ShowEmptyValue="True" MissingAssembly="Cannot import this Web Part." AllowClose="False" ID="g_1ccc4bca_3ba1_480b_b726_adfdb1e9e02d" IsIncludedFilter="" DetailLink="" AllowRemove="False" HelpMode="Modeless" AllowEdit="True" ValueFieldGuid="fa564e0f-0c70-4ab9-b863-0177e6ddd247" IsIncluded="True" Description="Filter the contents of web parts by using a list of values from a Office SharePoint Server list." FrameState="Normal" Dir="Default" AllowZoneChange="True" AllowMinimize="False" DefaultValue="fnum" Title="Facilities List Filter" PartOrder="2" ViewGuid="2da5d8db-6b55-4403-80a8-111e42049f8b" FrameType="None" CatalogIconImageUrl="/_layouts/images/wp_Filter.gif" FilterName="Facilities List Filter" HelpLink="" PartImageSmall="/_layouts/images/wp_Filter.gif" AllowConnect="True" DescriptionFieldGuid="2d97730a-cd0d-4cb9-8b55-424951201081" ConnectionID="00000000-0000-0000-0000-000000000000" ExportControlledProperties="True" TitleIconImageUrl="/_layouts/images/wp_Filter.gif" ChromeType="None" SuppressWebPartChrome="False" IsVisible="True" ListUrl="/Lists/FacilitiesList" AllowMultipleSelections="False" ZoneID="Header" __MarkupType="vsattributemarkup" __WebPartId="{768E2035-0461-4A09-8DDD-CA7020C2B23D}" WebPart="true" Height="" Width="615px"></WpNs0:SpListFilterWebPart>
    Alla Sanders

  • Set default value based on current day value and setItems in Design studio

    Hello
    I have 2 filters on my dashboard - year and month. The default display of the dashboard should populate current year data. Is it possible to create formula to populate dynamic default value based on the current date using setSelectedValue() ?
    Also, for the calendar month, the items are set as below
    DD_MONTH.setItems(DS_1.getMemberList("0CALMONTH",
    MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 12, "ALL");
    This displays month values as 01/2014, 02/2014 ... How can I change these value to display as January if mm = 01 and February if mm = 02 etc..
    Thanks
    Sirisha

    Hi Victor,
    I have tried using below statment to populate current year as the default selection value for the dropdown. Used it on Startup, but for some reason it loads all the data when the dashboard is opened the first time. Any ideas?
    DS_1.setFilter("0CALYEAR",[Convert.subString(APPLICATION.getInfo().dateNowInternalFormat, 4,6)]);
    Thanks
    Sirisha

  • Set default value based on sql query?

    Hi,
    is it possible to set default value of an BC entity attribute by using sql expression?
    Eg. "select max(x)+1 from y where userid=?"
    Rgs
    Jernej

    Jernej,
    Yes, you can do this. Edit your entity object attribute, and in the Edit Attribute dialog select "Derived from SQL Expression". Then you can enter your expression in the Expression text box.
    Blaise

  • Set Default Value based on Field from another table for a custom object

    I'm trying to set the default value on a custom object field to the value of an account field. I have tried the syntax 50 different ways, and just am getting no where. The account field label displays as DBA, the integration tag is ltDBA_ACCT, and it shows up in reporting fx area as Account.Text_22.
    The custom object field I'm triying to update is also called DBA, which was originally the "NAME" required field. Does the table name, Account, have to be included? Do I need a function in front of the field?
    I have been updating the external ID using the row ID with syntex <ID> (Less than ID greater than) so I know it is possible to set the Default Value, but <DBA>, <ltDBA_ACCT>, "Account"."DBA", and so on just don't not work.
    If anyone knows how to enter this I'd really appreciate the help.

    Ok, so if you want to default a field to the value from another object, you have to use the JoinFieldValue function. I think you understand that, based on your original post, but I want to be sure that you do.
    Next, this will only work as a default if the record is created from the object that you wish to join on because a default works at record creation and the ID needs to be available for it to work properly. It will not work if you choose the related object record after the custom object record is created. You could set the value as a post-default, but that does not seem to meet your requirements.
    The syntax for the Default Value would be as follows: JoinFieldValue(ref_record_type, foreign_key, field_name).
    In your case, ref_record_type is '<Account>', foreign_key is &#91;<AccountId>&#93;, and field_name is '<YourFieldName>'. The best way to determine what the field name is would be to create a new workflow for Account and use the Workflow Rule Condition expression builder to pick your field ("DBA") from the list. The value that is returned by the expression builder should be placed in the field_name variable in the JoinFieldValue function (minus the brackets and in single quotes).
    Give this a shot and let me know how you do.
    Thom

  • How to set default value in ME21N

    Hi all,
    I want to set default value of PO item's price unit to 1000 and make it unchangeable, is it possible? If so, could you please tell me how to do that.
    Thanks in advance!
    Woody

    Dear Woody,
    1) if u want to make any field un-editable then make it Via SHD0
    2) Plz find the below link for Demo SHD0, here we need to make the field as out put only
    [https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/transactionVariant-AStepbyStepGuidefor+Creation]
    Plz Provide the link to ur Abaper
    Regards
    kumar

  • Set default value for people picker only when user checks a checkbox (Sharepoint 2010)

    The javescript in below link works for me.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/2b130f64-3db2-484a-9a53-ccbe18d2c5de/set-default-value-for-people-picker-in-list-template-current-user?forum=sharepointgenerallegacy
    However, I'd like to set default user for people picker only when user checks a checkbox. 
    I am new to  development. Could you please help me on this requirement ?
    Thank you very much. 

    Hello,
    Use this link to to validate checkbox value, if true then set the person or group value (i.e. as posted in your link).
    http://geekswithblogs.net/haniamr/archive/2011/03/10/validate-that-a-checkbox-is-checked-using-javascript.aspx
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Setting Default Values in Search Criteria for COSTCENTER

    Hi ALL,
    I need Help for setting default values in search criteria for COST CENTER.
    Basically the issue is when creating a Shopping Cart, i need to assign a COST CENTER at Item level under COST ASSIGNMENT Tab.
    While searching the cost center i need to default the following fields in my search criteria based on the Login User :
    1. Controlling Area,
    2. Language Key.
    Please suggest some solution.
    Thanks & Best Regards,
    Surya

    Hi Vani,
    Sorry for the delay reply and Thanks a Lot for your timely support......I would like confirm once again is the name of the BADI is <b>bbp_f4_read_on_exit</b> or <b>bbp_f4_read_on_entry</b>. In this BADI i've not found a method to default Controlling Area. Can you please suggest me which method i can use.
    Thanks & Regards,
    Surya

  • Prompt Default Value based in drilled result

    I am navigating(drill using action link) from an analysis to a dashboard where I have a prompt for currency. I want this to be initialized to a dynamic default value based on the column values.
    Master Analysis
    Country
    valid currency
    Drill
    India
    C1
    Link1
    India
    C2
    Link2
    China
    C4
    Link3
    India
    C3
    Link4
    China
    C5
    Link5
    Child Dashboard Prompt after clicking Drill (if i click any link against india)
    Header 1
    Header 2
    Currency
    C1
    Bla bla
    Child Dashboard Prompt after clicking Drill (if i click any link against China)
    Header 1
    Header 2
    Currency
    C4
    Bla bla
    Is there any way to achieve this in OBIEE 11g?

    Hi,
    If you are using the same presentation column (same TableName.ColumnName) in your analysis and in the prompt, then the values would be passed when you click on the link. If thats not the case, you can have a look at the below post:
    Navigate from report to dashboard and pass values between different column
    Thanks
    Hyder

  • Set Default Value of Multi-select list item

    I have a multi-select list item I want to default the value of to '%' (which is really '%null%') and have it selected. I tried setting default value of item, but it doesn't take '%null%'. I also tried a computation with a static of
    :P507_ITEM := '%null%'; How do you get the default value set and selected?

    Hi
    Shijesh is right, you need to change your null return value and use that return value as your default. Try and use something of the same datatype as your real return values if you plan to use '%' to display all as it will make your queries simpler. eg.
    Company A returns 1
    Company B return 2
    % returns 0
    Then your query would be...
    SELECT ...
    FROM ...
    WHERE company_id = DECODE(:P_COMPANY,1,1,2,2,0,company_id)
    Hope this makes sense.
    Cheers
    Ben

  • How to Set default value for taxonomywebtagging control with terms and nested terms

    Hi,
    I have created taxonomy control in custom aspx page and I am able to select terms but I am trying to setup default value to that control.
    Can anybody let me know how to set the default value for TaxonomyWebTagging control in custom.aspx page with nested terms?
    Any help would be greatly apprecited.
    Control code in aspx page:
    <td>
    <asp:Label runat="server" ID="lblLanguages">Field A: </asp:Label><asp:Label runat="server" ID="rfvlblLanguages" CssClass="errorMsg" ForeColor="Red">*</asp:Label>
    </td>
    <td>
    <Taxonomy:TaxonomyWebTaggingControl ID="term" Width="385px" runat="server" /></td>Mapping metedata code:TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    //Set the Business Unit Field
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GROUPName"];
    TermSet termSet = group.TermSets["TERMSETNAME"];
    Term term = termSet.Terms["TermA"];
    Guid termGuid = term.Id;
    term.SspId.Add(termStore.Id);
    term.TermSetId.Add(termSet.Id);
    term.AllowFillIn = true;
    term.AnchorId = countryGuid;
    term.IsMulti = true;
    Thank you.
    AA.

    Hi,
    According to your description, you want to set default value for TaxonomyWebTaggingControl.
    I have a test in my environment. It could be achieved by setting the Text Property of TaxonomyWebTaggingControl.
    Here is the code snippet:
    TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GroupA"];
    TermSet termSet = group.TermSets["A"];
    Term term = termSet.Terms["A1"];
    TaxonomyWebTaggingControl1.SspId.Add(termStore.Id);
    TaxonomyWebTaggingControl1.SSPList = termStore.Id.ToString();
    TaxonomyWebTaggingControl1.TermSetId.Add(termSet.Id);
    TaxonomyWebTaggingControl1.TermSetList = termSet.Id.ToString();
    TaxonomyWebTaggingControl1.AllowFillIn = true;
    TaxonomyWebTaggingControl1.IsAddTerms = true;
    TaxonomyWebTaggingControl1.IsMulti = false;
    TaxonomyWebTaggingControl1.Text = string.Format("{0}|{1}", term.Name, term.Id.ToString());
    Here is a detailed article for your reference:
    http://blog.bugrapostaci.com/2010/09/23/taxonomywebtaggingcontrol-sharepoint/
    Feel free to Reply the test result.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • How to set default values for boolean columns

    I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
    I've tried to set default value at column level:
    <Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
    Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
    <Default>TRUE</Default>
    </Field>
    and at content type level:
    <FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
    But in any case, when i create a new item with this content type, default value is applied.
    Can anyone tell how to set default values for boolean columns?
    Thanks in advance,
    Regards,
    Sergio

    In the field definition you can set
    <Default>1</Default>
    or
    <Default>0</Default>
    How to set the default value Null?

  • How to set default value to input field

    Hi Experts,
    I need to set default value to one input field for the transaction crmd_order as a screen variant. Guide me in doing that.
    Regards,
    Harish

    Using the transaction SHD0, you can define the screen variant. While defining the sceen variant, you are allowed to define the default values.
    Using screen variant, for the main transactoin, you can also define the transaction variant and you can use this as an independent transaction.

  • Any opinions on setting default values on Business Partner level?

    Hi All,
    I do not have a question, but would like to have a good discussion on how you should preferably be setting default values on a business partner and it's assignment blocks.
    In my opinion you have two main alternatives:
    1. The "old fashioned" way by using the get_<attribute_name> method and doing some checks for the perticular attribute in the context node.
    2. Using the Badi BADI_CRM_BP_UIU_DEFAULTS to fill fields with a default value. With some enhancements on the assignment blocks (making typed_context attribute public and, when not called yet, calling the badi) you can use the badi for all assignment blocks.
    Because I discovered via debugging that in the, by many forums suggested, badi code a programm error/exception is used so that the default values are only set during creation mode, I started doubting to use the badi. Because once I had set my data declarations to the right references and the exception did not occur anymore, suddenly it always fills the values even when there are already values filled. So additional checks are needed to assure that I am in creation mode.
    Although I like the use of the badi, because all my default values on the whole business partner object can be found in the same place, it is getting a bit strange to: first still enhance the view and context node class, adjust the visibility of the typed_context, call the badi and do all kind of checks to assure that you are in the right view/context node, where this all is faster and more lean and mean when done directly in the get_<attribute_name> method on a context node.
    Anyone who wants to give there opinion on this?
    Regards,
    Martijn.

    Cameron,
    Unfortunately you cannot pass the Account and Contact name before saving the record. Post default tries to capture the name just before the record gets saved, but as the record is yet to be created, the relationship wont exist and only the respective id fields will have values. If you try using account id/ contact id it will work else just pass the time stamp in the name field which will make sure there is some value when the record is saved. later in the back end you might need WS to update the field values.

  • Setting Default values in portal form

    I have a portal Master/Detail Form. I want to set some of the detail block columns value to the value of a field in the master block.
    In the formattng option of the detail column, I tried setting default value to:
    p_session.get_value_as_varchar2(p_block_name=>'MASTER_BLOCK', p_attribute_name=>'A_CLASS_CD');
    and default value type to: function (I also tried expression). It compiles, but gives me an error when I ry running form. How can you set the default value (from the value of a differnt field)?

    HI,
    You can set the default value to value of a different field. The only way is to use javascript like onFocus.
    Thanks,
    Sharmila

Maybe you are looking for

  • Error 26 when executing sql. File opened that is not a database file. My Easy System Cleaner will not work on Foxfire. What to do?

    I have the Easy System Cleaner. It worked through Internet Explorer. But when it comes to Mozilla Foxfire. It stops. The message is: error executing sql. Error 26. File opened that is not a database file "select[sql] from sqlite_master where [type]="

  • Manage devices

    I have 4 devices macbook, macbook pro, imac and iphone 3GS, apps sync from icloud to each device but in my account only shows 2 are authorised and showing in "manage devices", macbook pro and imac. Can anyone point me in the right direction please???

  • How to parse Dir Command Output ?

    Hi All, When I execute the Dir /tc i'll get the output :- Volume in drive D has no label. Volume Serial Number is E878-37E9 Directory of D:\rohit 02/15/2006 10:06 AM <DIR> . 02/15/2006 10:06 AM <DIR> .. 03/13/2006 11:03 AM 2,349 appe_attr_sheet.xls 0

  • ALV selection not displayed/shown

    Hello, I have a question concerning the ALV: In NW 7.0 everything was fine and working, as of EhP1 the selection for one ALV is not displayed. ...the selection is done alright and also corresponding events are raised. Nevertheless there is no visual

  • Hide the document folder in GW7

    Since I don't use the document management option in GroupWise, can I hide the document folder in GW 7 client? I asked that question with GW 6.5 and was told NO. Thanks Gina