Set Combobox value based on Datagrid selectedItem

I have been searching the forums and google for some time now
and I'm not sure how do this. I populate a datagrid from a
httpservice call to a php script. The datagrid is displaying
perfectly. I also populate two comboboxes from the same httpservice
with specific values. When I select a row in the datagrid, I'd like
the value of the combobox to change to that which corresponds to
the value from the datagrid.
I also have a few TextInput fields mixed in with the
comboboxes and I'm able to set those to the
datagridname.selectedItem.item. I would like to do the same for the
comboboxes.
The reason is so that I can edit users in a group within a
database. The comboboxes are for the specific groups that are
allowed to all users.
Please let me know if any other information is necessary. I
didn't think any of my current code would help with this question.
Any examples would be great, I just couldn't find any....
Thanks in advance for your time.
Chris

Tracy - I think I'm progressing, but I'm still running into
problems. I've changed the httpservice to call an eventhandler,
which in turn I use in the datagrid to populate it. I'm sure I
might need to change something, but it is working.... Once I get it
all working, I'll stop using lastResult and build event handlers,
now that I'm starting to get a better grasp on it.
I do get an error though, stating: "Data binding will not be
able to detect changes to XMLList "user", need an XML instance."
Also, I can't seem to get "trace" to work. I'm guessing it should
be popping up a window? If I do an alert popup, it does show the
data.
[Bindable]private var myData:XMLList;
private function test(oEvent:ResultEvent):void {
myData = XMLList(oEvent.result);
trace(myData.toXMLString());
mx.controls.Alert.show(myData);
<mx:HTTPService id="getUsers"
url="https://server/flex/getusers.php" resultFormat="e4x"
result="test(event)" useProxy="false" method="GET"/>
<mx:DataGrid id="dgUserDetails" right="5"
dataProvider="{myData.user}" height="315"
click="onChangeUser(event)">
<mx:columns>
<mx:DataGridColumn headerText="Username"
dataField="uname"/>
<mx:DataGridColumn headerText="Group"
dataField="team"/>
<mx:DataGridColumn headerText="Status"
dataField="status"/>
<mx:DataGridColumn headerText="Last Login"
dataField="llogin"/>
<mx:DataGridColumn headerText="Count"
dataField="lcount"/>
</mx:columns>
</mx:DataGrid>
Now, onto the user editing fields. I'm still trying to figure
out how to use this example you gave me. I understand the xmlUser
var and I think I understand the xlGroups var. Not sure how it
should work though. It looks as though xlGroups tries to get the
group from allusers under the user name?
[Bindable]private var _xlcGroups:XMLListCollection;
private function onChangeUser(oEvent:Event):void {
var xmlUser:XML = XML(dgUserDetails.selectedItem); //the
Users dataProvider item
var xlGroups:XMLList = xmlUser.allusers.group; //this
depends on your xml structure
_xlcGroups = new XMLListCollection(xlGroups)
trace(_xlcGroups.toXMLString() ); //so you can see exactly
what you have
Let me try to give a better example of the XML.
<allusers>
<user>
<uname>user1</uname>
<level>6</level>
<status>active</status>
<team>alpha</team>
<llogin>0000-00-00 00:00:00</llogin>
<lcount>0</lcount>
</user>
<user>
<uname>user2</uname>
<level>6</level>
<status>active</status>
<team>alpha</team>
<llogin>2007-03-26 11:31:53</llogin>
<lcount>128</lcount>
</user>
<user>
<uname>user3</uname>
<level>1</level>
<status>active</status>
<team>bravo</team>
<llogin>2006-02-17 20:08:23</llogin>
<lcount>3</lcount>
</user>
<group>
<teamname>alpha</teamname>
<teamlead>user2</teamlead>
<teamstatus>active</teamstatus>
</group>
<group>
<teamname>bravo</teamname>
<teamlead>user3</teamlead>
<teamstatus>active</teamstatus>
</group>
<statusops>
<status>active</status>
</statusops>
<statusops>
<status>inactive</status>
</statusops>
</allusers>
And here is a more detailed view of the user editing panel.
Again, I always want the comboboxes to display the data returned
from the httpservice call. But I want to change the value when the
user is selected.
<mx:Panel width="250" height="315" left="5"
layout="absolute" title="User Details">
<mx:HBox x="10" y="27" width="210">
<mx:Label text="Username" width="65"/>
<mx:TextInput id="adm_username" width="137"
text="{dgUserDetails.selectedItem.uname}"/>
</mx:HBox>
<mx:HBox x="10" y="55" width="210">
<mx:Label text="Group" width="65"/>
<mx:ComboBox id="adm_usergroup" width="137"
dataProvider="{getUsers.lastResult.allusers.group}"
labelField="teamname"/>
</mx:HBox>
<mx:HBox x="10" y="83" width="210">
<mx:Label text="Level" width="65"/>
<mx:TextInput id="adm_level" width="137" maxChars="1"
text="{dgUserDetails.selectedItem.level}"/>
</mx:HBox>
<mx:HBox x="10" y="111" width="210">
<mx:Label text="Status" width="65"/>
<mx:ComboBox id="adm_activestatus" width="137"
dataProvider="{getUsers.lastResult.allusers.statusops}"
labelField="status"/>
</mx:HBox>
<mx:HBox x="10" y="137" width="210">
<mx:Label text="Password" width="65"/>
<mx:TextInput id="adm_password" width="137" enabled="true"
backgroundDisabledColor="#C0C0C0" displayAsPassword="true"
change="adm_chkusr(adm_password)"/>
</mx:HBox>
<mx:HBox x="10" y="165" width="210">
<mx:Label text="Confirm" width="65"/>
<mx:TextInput id="adm_confirm" width="137" enabled="false"
backgroundDisabledColor="#C0C0C0" displayAsPassword="true"
change="adm_chkusr(adm_confirm)"/>
</mx:HBox>
<mx:HBox x="10" y="205" width="210">
<mx:HBox width="50%">
<mx:LinkButton id="adm_clruser" label="Clear"
click="clearviewUser()"/>
</mx:HBox>
<mx:HBox width="50%">
<mx:LinkButton id="adm_moduser" label="Modify User"
enabled="false"/>
</mx:HBox>
</mx:HBox>
<mx:HBox x="10" y="233" width="210">
<mx:HBox width="50%">
<mx:LinkButton id="adm_deluser" label="Delete User"
enabled="false"/>
</mx:HBox>
<mx:HBox width="50%">
<mx:LinkButton id="adm_adduser" label="Add User"
enabled="false"/>
</mx:HBox>
</mx:HBox>
</mx:Panel>
Thanks again for your time. I look forward to your response
as this is driving me crazy.
Regards,
Chris

Similar Messages

  • Combobox values based on query

    I created combobox but how can I set its record source to be based on a query ?

    Well it was no working, however I did it myself like this:
    Declare
    num number;
    my_spid varchar2(9);
    my_desc varchar2(25);
    myvar varchar2(9);
    i number;
    BEGIN
    select count(*) into num from specialty_master;
    i:= 1;
    loop
    myvar:='SP00'||i;
    SELECT description, sp_id INTO my_desc, my_spid FROM specialty_master where sp_id=myvar;
    Add_List_Element('SP_ID', i, my_desc, my_spid);
    i := i + 1;
    exit when i > num;
    end loop;
    END;
    My Sp_id in database was like: SP001,SP002,SP003
    I had to use myvar:='SP00'||i because of some rownum problem.
    But now my error is: No initial value selected for listbox.
    How to set initial value.

  • Can't set comboBox value that has valueMember / displayMember

    Hello All,
    I'm working on a project where I'm dynamically building a form according to a configuration schema. I'm pretty new at C# and got the following issue I can't get sorted out . 
    Any help, advise would be great !!!
    When building a ComboBox I can't set the value I want !!
    Probably I'm missing something.
    I've tried several methods but nothing does it ... below my code.
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    namespace ComboBoxSample
    public partial class Form1 : Form
    public Form1()
    InitializeComponent();
    CreateComboBox();
    public void CreateComboBox(){
    //Working variables
    string valueMember = "idColumn";
    string displayMember = "valueColumn";
    //Create a panel and add to the form
    TableLayoutPanel tlp = new TableLayoutPanel();
    this.Controls.Add(tlp);
    //Create the data source
    DataTable dataTable = new DataTable();
    dataTable.Columns.Add(valueMember, typeof(string));
    dataTable.Columns.Add(displayMember, typeof(string));
    dataTable.Rows.Add("A", "value A");
    dataTable.Rows.Add("B", "value B");
    dataTable.Rows.Add("C", "value C");
    //Create a binding source
    BindingSource bindingSource = new BindingSource(dataTable, null);
    //Create a comboBox and bind the datasource
    ComboBox comboBox = new ComboBox();
    comboBox.DropDownStyle = ComboBoxStyle.DropDownList;
    comboBox.DataSource = bindingSource;
    comboBox.ValueMember = valueMember;
    comboBox.DisplayMember = displayMember;
    Try and set the value
    //No methode displays B --> combo stays on A
    comboBox.SelectedValue = "B";
    //comboBox.Text = "value B";
    //comboBox.SelectedItem = comboBox.FindStringExact("value B");
    //add the controles to the panel
    tlp.Controls.Add(comboBox, 0, 0);

    Hi Viorel_,
    Thanks for the reply!!
    The  setting the value in the form's Load event does work!
    I agree for the form designer but it does not fit the need.
    What I have is a "meta-data" driven logic where I define a screen that matches database fields:
    Example : Screen new person has 5 fields : Gender (combobox) , first name (textbox) , last name (textbox) , type (combobox) ,birthday (datetime)
    I have a Form derived class that takes this definition and builds each control at run time.
    The definition also comes with potential default values (i.e. :type = client) so what I want to do is affect the value on the fly. This works fine with textbox or datetime. I'm trying to do the same for combobox.
    Maybe I got this all wrong from a design point of view.

  • 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

  • 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

  • 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 initial value based on query

    Is it possible to set the initial value of a field based on a query. Kindly advice.
    Regards,
    Careen

    Hi,
    Yes. You can create a VO for your query and map that to the field on your page. Then execute the VO in PR method.
    Or if the field is not based on VO, you can execute your query in PR method using PreparedStatement. Then get the handle of the field and set its value to the value returned in resultSet of the query.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Trying to set attribute value based on user selection of another attribute

    I am trying to set an attribute value based on the user's selection of another attribute using JSP EditCurrentRecord. When the user chooses the AreaId from the combo box I want to look up the value of the RgnID, preferrably without the user seeing this field at all. Below is my code which does not work. When I run it I get Error Message: null. Any suggestions are appreciated!!
    <jsp:useBean id="RowEditor" class="oracle.jbo.html.databeans.EditCurrentRecord" scope="request">
    <%
    RowEditor.initialize(pageContext, "MyProject2_package1_SRSecurityModule.UsrAreaWhView");
    RowEditor.setTargetUrl("UsrAreaWhView_SubmitInsertForm.jsp");
    RowEditor.createNewRow();
    RowEditor.setDisplayAttributes("OracleId, RgnId, RegionKey, AreaId");
    RowEditor.useEditField("OracleId");
    RowEditor.getFieldRenderer("OracleId").setPromptText("Oracle ID");
    RowEditor.useEditField("AreaId");
    RowEditor.useComboBox("AreaId","AreaWhView","Area","AreaKey");
    RowEditor.getFieldRenderer("AreaId").setPromptText("Area");
    RowEditor.useEditField("RgnId");
    RowEditor.getFieldRenderer("RgnId").setPromptText("Region");
    RowEditor.getRowSet().getViewObject().getCurrentRow().setAttribute("RgnId",RowEditor.getRowSet().getViewObject().getCurrentRow().getAttribute("RegionKey"));
    RowEditor.setReleaseApplicationResources(true);
    RowEditor.render();
    %>
    </jsp:useBean>

    ok, sorry everyone for making it confusing; this is what I am
    trying to acheieve;
    I would like the user to populate my database with thier
    username AND userID. I have a dropdown box with thier username
    dynamicly populated already, what I am trying to achieve, is a way
    of when the user selects thier username either another dropdown or
    a hidden field is automatically populated with the appropiate
    userID (to match thier username). Now I could just have two
    dropdowns and they select both, but i'd rather avoid the
    possibility of mismatches, and that is why I would like it to be
    automatic and based on thier username selection...
    Does that make sense....?

  • Setting column values based on LOV selection

    Hi All,
    I am using JDeveloper 11.1.2.2.0. I have a table eg: Department table, in Dept Id, I have defined LOV for that field. My requirement is, based on the LOV selection, I want to set the other column values. I am using InputTextwithLOV in list type. How to achieve this?
    I tried mentioning that in the List return values. But it is not setting the values.
    Regards,
    Infy

    Hi,
    if you use a model driven LOV then when configuring the LOV you can map additional attributes. When you build a model driven LOV you at least once tell it which LOV attribute should be used to update the DeptId field. You can do the same for additional attributes
    Frank

  • 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

  • Dynamically set a value based on value selected from LOV

    Apex 4.2
    I'm having trouble creating a dynamic action to set a value. I've used dynamic actions to hide and show regions but for some reason cannot set a value.
    I have a select list  --> P101_LIST. Source Type is 'Database Column'. Source value or expression is 'person_id' The query is as follows:
    Select first_name, person_id
    From Persons
    I have a display value --> P101_DISPLAY. Source Type is 'Static Assignment'. Source value or expression I left blank.
    I would like for every time the user selects a name from P101_LIST, the P101_DISPLAY item gets updated to show the corresponding value(person_id).
    Because there are other page items / information on the page, I would prefer this to not submit / update the page. Wouldn't want other page items / information getting updated.
    Any help on this matter would be greatly appreciated. Thanks in advance.

    Hi,
    Create a DA:
    - event onChange P101_LIST
    - Action: PL/SQL
    - PL/SQL code:
    :P101_DISPLAY := :P101_LIST;
    Items to submit: P101_LIST
    Item to return: P101_DISPLAY
    And done.
    Regards,
    Joni

  • How to set radiobutton values based on some input values?

    LCD 8.0
    I have a table with 5 rows - each row has a checkbox in it.
    The user can select 0 - 5 checkboxes. Based on the number of selected checkboxes, I need to dynamically 'press' a radiobutton (out of 5) to show the corresponding Risk level - If 2 checkboxes are checked, I need to press radiobutton #2, if 3 checkboxes the 3rd radiobutton, etc..
    I can get the 1st one to work, but can't seem to be able to change it to any other radiobutton after the first.
    What I do is sum the # of checkboxes checked, and try to set the raw.Value of the radiobutton = 1.
    >var orgcnt = sum( PDF_CONTAINER.ConceptPage1.RisksPositioned.ORGRISKS.DATA[*].RISK_IND )
    >if ( orgcnt == 1 ) then >PDF_CONTAINER.IdeaSheetPage2.RiskAssesSubform.RiskTable.RISK_*****1.cell3.RadioButtonLis t.NoRisk.rawValue = 1
    >endif
    >if ( orgcnt == 2 ) then >PDF_CONTAINER.IdeaSheetPage2.RiskAssesSubform.RiskTable.RISK_*****1.cell3.RadioButtonLis t.MinorRisk.rawValue = 1
    >endif
    If I select 1 Checkbox, the first radiobutton IS pressed, however, when I select a 2nd checkbox, the 2nd radiobutton is NOT pressed and also blanks out the 1st radiobutton.
    any ideas?
    thanks,
    rp.

    Paul,
    thanks for your input.
    However, I'm not trying to change radiobuttons in Row2 - I'm trying to change a set of 6 radiobuttons in my Row1.Cell3
    I will always and only have two rows in my table. This first row is named
    PDF_CONTAINER.IdeaSheetPage2.RiskAssesSubform.RiskTable.
    b RISK_*****1
    and the second row is named
    PDF_CONTAINER.IdeaSheetPage2.RiskAssesSubform.RiskTable.
    b RISK_*****2
    In Cell3 of each of those rows, I have a Radiobutton group with 6 radiobuttons (named NoRisk, MinorRisk, SmallRisk, ModerateRisk, VeryRisky, CriticalRisk).
    What I'm trying to do is "press" one of those radiobuttons based on some other variable's value.
    Here's a sample bit of code that checks if my variable = 3, then "press" the 3rd radiobutton
    ] if ( orgcnt == 3 ) then
    PDF_CONTAINER.IdeaSheetPage2.RiskAssesSubform.RiskTable.RISK_*****1.cell3.RadioButtonList .SmallRisk.rawValue = 1
    endif
    But, I'm not getting a radiobutton pressed.
    EDIT: by the way, i'm sure my summed value is coming back because I placed it in a message box & see the correct number.

  • Setting prompt value based on another prompt selection

    I have 3 prompts. The first one contains 'Y' and 'N'. The other 2 are for start-date and end-date so the report runs for this date range. I would like the start-date to be set to, say, '01/01/2009' if the user selects 'N' in the first prompt. If the user selects 'Y', the start-date will be set to, say, '02/01/2010'. These values are not dynamic though.
    Please let me know how I can do this.
    Thanks,
    Bhusan

    Sandeep,
    Here is what I did.
    1. The first prompt has 'Y' and 'N' that comes from a database table. So did not have to create these.
    2. The second prompt - Used the following SQL for Show - select (case '@{LegacyVal}{N}' when 'N' then '01/01/2009' when 'Y' then '02/01/2010' end) from SubectArea."Registration Date". I kept "All Choices" checked. In the default to, I selected "All Choices".
    Now when I test this and select any value from the first prompt, the second one does not change. It keeps the All Choices value always. What am I doing wrong here? I went through the earlier posts and tried to follow the steps, but looks like I am not doing the right way.
    Thanks,
    Bhusan

  • 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.

  • How do I set the value of a dynamic row text field

    I have a repeated row form which contains a button and multiple text fields.  There is a text field (Input Data Field) further up with some information I want to place in the table and multiple buttons that I want to read the value of and set to the table.  I apologize there are multiple questions I have and I am using pseudocode to describe it.
    Top form looks like
    InputField
    | ButtonX1 | ButtonY1 | DescriptionX1 (read only Text Field)
    | ButtonXn | ButtonY1 | DescriptionXn
    OutputRow looks like
    | ButtonOutput | OutputField1 | OutputField2 | OutputField3 |
    So I would like it to do
    ButtonX1.click
    OutputTable.OutputRow.addInstance(true)  //this works - everything else I have questions on
    OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue
    Question 1
    How do I address the location in each table to set a value
    Question 2
    How do I get the value of the description field in the same table and row as the button
    I would like to say something to the effect of  OutputTable.OutputRow[??].OutputField1.rawValue = this.parent.DescriptionX
    OutputTable.OutputRow.OutputField2 = InputField.rawValue
      Same question as above - how do I specify a dynamic row - is this the proper syntax for getting the value from the input field?
    OutputTable.OutputRow.OutputField3 = this.ButtonLabel
    Question 3
      How can I get the value of the button's label to set in the field
      There should be very many of these buttons and buttons will be added - I would prefer to set the value based on the button's label to make the value easier - not requiring changing the code
    Question 4 - unrelated to those above.
    Is it possible to build the first table
    | ButtonX | ButtonY | Description |
    from an XML File.  I have seen examples of how to build if it is just data, but can the XML be pushed into a form with code to do the above actions?

    Each object in a form must have a unique name. I doing so it is not neccessarily the name but the path or SomExpression associated with that object that must be unique. In your case you have a Table.Row.object configuration. The Row is the part that is repeating so to give each object a unique name an instance number is placed on the repeating part. So objects in the 1st row woudl be Table.Row[0].object...objects in the second row woudl be Table.Row[1].object etc .....You can see this by adding a debug instruction on the Enter event of the description field. Put the code app.alert(this.somExpression) and when you enter the field you will see what the somExpression is. Do this for a few rows and you will see the pattern (don't forget to remove the debug code from the enter event). Now you know what you have to use to address the fields. If no instance is given it is assumed to be 0 ..that is why only the 1st row is being affected.
    So now to answer your questions:
    Question1: The square bracket notation is an issue for javascript (this is the notation for an array) so we have to use a different means of addressing the field to include the instance number. So to address the Description in the 3rd row we woudl use:
    xfa.resolveNode("Table.Row[2].Description").rawValue = "This is my new description";
    Note that the instance number is 2 for the 3rd row because the instance numbers are 0 based.
    Question2. The resolveNode notation allows you to pass a string so you can also concatinate expressions to make the string. If you are writing code on a button in the same row you can get the instance that you are on by using the expression this.parent.index. The "this" portion refers to the current object (the button) and the parent.index gets you th eindex of the Buttons parent. If the button is embedded deeper in a hierarchy then you can continue to add parent indicators until you get back to the node that you want. So rewriting your expression from Q1 it woudl be:
    xfa.resolveNode("Table.Row[" + this.parent.index + "].Description").rawValue = "This is my new description";
    Question3: The buttons caption can be retrieved by using ButtonName.caption.value.text.value
    Question4: When you say build from an XML file. What are you expecting to come from the XML file? The caption that goes on the button? Typically the XML file carries data (not to say that it cannot carry other things). Just need a bit of clarification on this one first.
    Hope that helps
    Paul

Maybe you are looking for

  • NI LabVIEW Run-Time Engine + TCP/IP

    Hello, Anybody knows how to activate TCP/IP service on PC with standard NI LabView Run-Time Engine installed. If I trying communicate with server from my PC (LVRTE) its works correctly.   However, when I am trying interchange client and server applic

  • Link Rectangles rotated on edited pdf

    Historically there was often a problem editing landscape pdf's created in one version of Acrobat and being updated in a later version: existing link rectangles would be rotated by 90° when the new page (with or without new links) was inserted as a re

  • Belege in B1 aus externer Anwendung öffnen

    Hallo, besteht eine Möglichkeit Belege in Business One aus einer externen Anwendung heraus zu starten(bspw. per URI)? Ich möchte Reports per E-Mail versenden oder auch als pdf anbieten, so dass aufgeführte Belege per Klick direkt in B1 geöffnet werde

  • So, my iphone is not having so much batery, is it normal?

    Someone help me

  • To view the WBS

    Hello, Can any body tell me, If I am see the how many WBS is created in this current finance year which t-code I will use to see it. thanks with regard, Asutosh