Set value in ViewObject from another ViewObject

Hello,
I am creating a program and have the following problem: I Have three view Objects say like: A, B and C. A is the master class and has a view link to B an C. But now I am facing the following problem. When I create a new A and then B, in B a value is automatically retrieved from A (something like a before insert trigger but then programmatically from the (specific) entity object). (There isn't a commit yet!) Then when I create a new C. I want to show the value that was calculated in B shown in C. But there can be multiples rows in B so I want only the value from B from the row that is currently selected.
Has anybody an idea/solution to solve this?
Thanks in advance!

Hello,
I have a some like problem in adf bc.
Let me explain you what I want to do.
I have two tables. Message and MessageProperties. Message table is connected with itself as same as Employee table of HR. Means a Message can have various child message. MessageProperties contains the message properties. A message can have various properties. I want to show the message only if it has a particular value in MessageProperties,then its properties,its child message. If its child message have the same value in MessageProperties,then it shows that. Likewise it should give me a tree structure with its all properties
Let me explain you step by step what I have done for this.
1> I have created a view MessageView with two entities i.e Message and MessageProp and include the value attribute of MessageProp in it.
2> I have created the default MessagePropView from MessageProp Entity.
3> In MessageView I have modified the query which you have given.
4> I have created the Bind variables.
5> I have created a view criteria and in that view criteria I have included Message_Id=:Bind_MessageId and Value=:Bind_Value.
6> I have created an association connecting Message.Message_Id and Message.Parent_Id(1 to * cardinality) because a message can be a parent of many messages.
7> I have created a viewlink between Message and MessageProp using Message_Id.
8> I have created a view link between Message and Message using the association which I have created in step 6.
9> I have created the Application Module. In that,my Data Model looks like
---MessagePropView2
---MessageView1
---------MessagePropView1
---------MessageView2
10> Then I have created the service interface. In service interface view instances,I include these two view and select the GetByKey operation from basic operations.
11> From View Criteria find operations I have included the view criteria which I have created in message view in step 5.
12> Then I run the AppModuleServiceImpl.java and select the view criteria operation which I have created in step 11.
13> There I find two bind variables i.e. Bind_MessageId and Bind_Value. I give the values there.
But it checks whether that message Id(Bind_MessageId) which I have given have that value(Bind_Value) or not. If it has then it shows only that message along with its properties but it is not showing me its childs and their properties.
I want to show only those child message who have the MessageProp.value as (Bind_Value).
I hope you understand with the scenario.
I'll be very thankful to you if any help me to do this.
Thanks in advance.

Similar Messages

  • Set value of zzidarea from another context node

    Hi is it possible to set the value of the zzidarea field of the context node header from the method  get_employeename of the context node employeename?
    Thanks!!

    Hi,
            Your question should be framed better. I suppose that you are trying to set the value of a header attribute from one of the child relations. Assuming that the relations are buffered, it is possible to reach the header entity by using the get_parent or get_root and using relations again. However it is not a good practice trying to set values in a getter method. You should find another proper approach to your problem.
    Regards,
    Arun Prakash

  • Inserting a db row from a form with a value passed in from another page

    We have a report (P1) on a table (T1). P1 has a link column (C), and C is the PK on T1. Clicking on a link (i.e., a row) in report P1, takes us to form (P2). P2 is used to allow the user to insert a new row into T1, with the constraint that one of the columns (X) in T1 must have the same value as X had in the linked row on P1. Also, X is a NOT NULL attribute.
    What we are doing is:
    First, passing C to P2 by setting the link name=P2_X_C and the link value=#C#
    Second, in P2, we are setting form element P2_C via a SQL statement:
    SELECT X
    FROM T1
    WHERE C = :P2_X_C
    P2 displays nicely. We set P2_C to display only, and allow the user to enter values for the other columns. The value displayed for X is not NULL and correctly matches the value from P1. However, when we hit the CREATE button on P2, we get error: ORA-01400: cannot insert NULL into "T1"."X". Unable to process row of table T1.
    APEX seems to have an "issue" with having a value in a form "set" and transmitted to the DB on INSERT.
    Any help would be greatly appreciated.

    Hi,
    1 For "Display Only" items that you are not populating directly from a database column, if you want to save the value, you have to ensure that Save Session State is set to Yes and these items are not actually submitted with the page. The same sort of thing would apply to Disabled or Read-Only items as browsers do not submit these items - though these are more tricky to deal.
    2 Passing the PK value is the most common way of identifying which record contains the values you need. Passing other values is also typical - eg, for applying filters for calendars or searches or for setting flags.
    3 For database columns, which should be based on the underlying table's data, you can use the Default Value settings - though be aware that these values do not exist in session state until the page is submitted. That's ok if you don't need to use the value anywhere else on your page
    Andy

  • Passing field values to form from another form

    Hi,
    I have multiple detail table for a master table. The master table is project table and the details tables are all related to the project table. In the portal forms we cannot have a form based on multiple child tables. So I am trying to enter one detail table at a time. I have created a master-detail table based on project table and a detail table (cost table). After I enter data in this MD form I want to carry the projectid to another form based on another detail table (resource table) on the next page. I want to navigate to this next form by clicking on a next button after I have entered data on the previous MD form.
    The projectid is a hidden field in the first MD form and is generated by a database sequence. I understood that there is many ways to send field values to a form:-
    1. By creating a moduleid link on the next button. This link will have the projectid value
    2. By calling the form from a PL/SQL procedure on the CALL/GO of the first MD form.
    I am not sure how to get the 'projectid' value generated from the sequence and pass it to the link or a procedure. Will the projectid value be stored in the session ? How do I get it ?
    Is the above way of entering multiple detail tables feasable ? Please advice.

    Hi,
    I have multiple detail table for a master table. The master table is project table and the details tables are all related to the project table. In the portal forms we cannot have a form based on multiple child tables. So I am trying to enter one detail table at a time. I have created a master-detail table based on project table and a detail table (cost table). After I enter data in this MD form I want to carry the projectid to another form based on another detail table (resource table) on the next page. I want to navigate to this next form by clicking on a next button after I have entered data on the previous MD form.
    The projectid is a hidden field in the first MD form and is generated by a database sequence. I understood that there is many ways to send field values to a form:-
    1. By creating a moduleid link on the next button. This link will have the projectid value
    2. By calling the form from a PL/SQL procedure on the CALL/GO of the first MD form.
    I am not sure how to get the 'projectid' value generated from the sequence and pass it to the link or a procedure. Will the projectid value be stored in the session ? How do I get it ?
    Is the above way of entering multiple detail tables feasable ? Please advice.

  • Plz help me how to set values in js from form

    hi alll.......
    i have a problem in my jsp..........i had given hyperlink for second action in jsp, user will select an id from combo...and insert values in text box when they click on button i need to insert these values in database.......
    problem here is all values are passing null value........i am setting through form..i ma not getting the values from anywhere.
    i don't know the problem will u plz help me out in this.........
    thanks in advance.......]chintu

    Your question and the way you type doesn't make much sense to me. Could you be specific about the problem - maybe with code snippets.

  • Using a .bat file to use Values in Registry from another Registry

    I recently starting working in an IT Department and for years my superiors/co-workers have always had a piece of software called "cyt.exe".
    When ever I logged in someones computer as Admin, this software allowed me to log out with their username still in the log in text box. We recently upgraded a large quantity of systems to Wins7 and WinEmbedded7 and that program no longer works due to the
    registry change.
    Currently the best I could to for replicating that software function as .bat file is:
    call reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v LastLoggedOnSAMUser /t REG_SZ /d "domain/username" /f
    call reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v LastLoggedOnUser /t REG_SZ /d "doamain/username" /f
    pause
    When I log out, it leaves the user name and password blank which is OK but I need to take it one step further. I need the values of:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI
    "LastLoggedOnSAMUser"="domain\username"
    "LastLoggedOnUser"="domain\username"
    to match the values that are in
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\SessionData\1
    "LoggedOnSAMUser"="domain\username"
    "LoggedOnUser"="domain\username"
    Any suggestions on what I need to change in my code to manipulate the registry to match those values without having to manually input them?

    - Vegan Fanatic
    "can you fix the cyt.exe program, that would be the best option long term"
    Well the cyt.exe program hasn't been updated since 2000 (version 2.3 and 2.5 were the latest versions) so I can only assume the developer has abandoned the project. The reason why it doesn't work anymore is because of the registry change going from XP to
    Vista/Win7/Win8.
    Once I have my own batch file, it will be easier to tweak it as needed when an operating system changes then it is to rely/wait on someone else to update a very specific piece of software that only has one small purpose that has most likely been forgotten.
    As much as I would like to modify the existing program, I don't have any software I can use to re-program it and I doubt I have enough knowledge or experience to tweak it correctly.
    - Frederik Long
    "You need to experiment either with reg query / reg add or reg export / reg import. Each of these commands has inbuilt help, e.g. reg import /?."
    From what I tested, the export/import copies the file and its values and placed them where I asked it too. That is not what I need. I need the values ONLY and placed within the file I need which has a different name from the file I exported from.

  • View criteria condition needs to check value in column from another VO

    Hi All,
    My Jdev version - 11.1.1.6
    My use case is as follows-
    2 view objects say EmpVO and DeptVO which have view link with deptId as the foreign key attribute. I need to show the distinct list of departments along with a column which contains the employee names separated by comma for the particular department in the corresponding row. Hence, for DeptVO I use the query as follows -
    -          SELECT deptId,
    -                 deptName,
    -                 (SELECT listagg (empName, ',') WITHIN GROUP (ORDER BY empName)
    -                            emp_names
    -                    FROM EMP_TABLE emp
    -                   WHERE emp.deptId = dept.deptId)
    -                    emp_names
    -            FROM DEPT_TABLE
    This gives me the result on screen as follows -
    DeptId          DeptName          EmpNames
    101               HR                    emp1,emp2
    102               Finance             emp3,emp4,emp5
    Now, my requirement is that there should be a search on department which should also contain an LOV (with search icon) for the employee names i.e. if user selects emp4 from the LOV, department table should list the record for 102.
    For this , I added an LOV on the EmpNames attribute of DeptVO (to map the values from EmpVO) and added a view criteria based on which I added a query panel on screen and the relevant partialTrigger attribute so that the department table should reflect the search results. I tried 2 options in the View Criteria of DeptVO i.e.
    1. Added an Item 'EmpNames = '. WIth this, EmpNames attribute appear with Searh icon in the query panel(which is required) but it does not display the right department record bcz it tries to match exactly with values like 'emp3,emp4,emp5'
    2. If I add Item 'EmpNames CONTAINS ' , EmpNames search will work from query panel i.e. if I enter the value as emp4, department 102 will be shown in the results table but there is no Search icon on the EmpNames field in query panel. The component actually becomes an inputText.
    It would be of great help if you can guide on a better way to achieve this use case. Please let me know if there needs to a change in the approach or if any other details are needed.
    Regards,
    Ansh

    Hi Timo,
    Thanks for this. I have already implemented this part. Here, in the example there's an LOV on department id and form is on employee entity. However, my use case is a different one. I need to search for department which should contain a search criteria for employee in the form of LOV.
    Could you suggest some possible solution?
    Regards,
    Ansh

  • Set up user accounts from another Mac in Sharing and Permissions?

    Hello!
    I'm using GoodSync (app) to synchonize several folders between my MacBook Pro Retina and my iMac daily, via a scheduled task. GoodSync is installed on the MBP and the folders that I'm syncing between the two are connected via network shared. (See screen shot --- this is from the MBP)
    This method works, however in order to get everything to share properly, I had to set read and write permissions for all the groups (my username on the iMac, and the "everyone group") under Sharing and Permissions for every folder and it's contents. I'm concerned that "everyone" has the possbility to get into/ruin my files and folders. (see screen shot -- this is from the iMac)
    Is there anyway I could assign my MBP's user account to come up under Sharing and Permissions in the Get Info window (on the iMac) for all the folders I'm syncing between the computer, that way I could give just the MBP or just the MBP's user account the permission to "Read and Write" (on the iMac)? 
    Could anyone please tell me how or give me a more secure way of doing this? Really liking GoodSync over my local network because my data doesn't get copied to a cloud.
    Thanks for looking/contributing advice!
    Julie.

    You can create a sharing-only account in the users and groups system preferences, and use this as a means for establishing permissions and access to shared folders so syncing programs can access them. This account can be managed in the file sharing preferences just like any standard account, only that it does not have a local home folder and cannot be used to log into the system at the login window.

  • Calling web applications from another web application

    Hi everyone,
    I direly need your suggestions on how to implement the following requirements:
    I have a web application (i.e. App A). Then I have other web applications (i.e. App B, App C, App D, etc.) .
    For each of the other apps (App B, App C, App D), I need to have 2 variable/attribute settings whose values are to be set (pre-defined) per user.
    Meaning one user's values are different from another user.
    In App A, I need to call App B, App C, & App D one by one to get the values of the 2 variables/attributes for a particular user accessing App A.
    How should I implement this whole scenario such that I can set the values for 2 variables/attributes in App B, C, & D on a per user basis?
    Please help me get ideas on what methods or work-arounds to implement in order to achieve this.
    Thanks.
    blm

    Assuming this is running on a server, how about placing your data in application scope?
    All applications have access to it. Just make sure every object put in application scope is uniquely named
    and that your other application knows its name. One suggestion is to put a collection object (such as a List) in application scope and add items to it. This way, every application will know the collector's name. They can then search through the collection for any object addressed to itself. Just make sure you send data into and out of the collection in a thread safe way. such as by synchronization.
    Here is an example of an object that you can store in the collection:
    MessageObject{
    String fromApplication;
    String toApplication;
    String message;
    }

  • 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 lookup value from another item

    Hi!
    I add to my list in SP 2013 new column like type Lookup field and select item from another document library
    and display field select "Title". How i can set this filed value for new item from document library item?

    Hi AllXander,
    From your description, my understanding is that you want to set lookup field value with C# CSOM.
    You could use method "FieldLookupValue()". Please refer to this code below to set lookup field value when add an new item to a list:
    // replace your site URL
    using (ClientContext context = new ClientContext("http://sp/sites/sp2013"))
    // replace your user, password and domain
    context.Credentials = new NetworkCredential("Administrator", "Access1", "contoso");
    // the library that you get value for the lookup field
    List list = context.Web.Lists.GetByTitle("Department");
    context.Load(list);
    context.ExecuteQuery();
    CamlQuery query = new CamlQuery();
    query.ViewXml = "<View/>";
    ListItemCollection allContacts = list.GetItems(query);
    context.Load(allContacts);
    context.ExecuteQuery();
    foreach (ListItem item in allContacts)
    // replace the id that you want to set value to the lookup filed
    if (item.Id == 1)
    // replace the list title with your list that you want to add the item
    List oList = context.Web.Lists.GetByTitle("Employee");
    ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
    ListItem oListItem = oList.AddItem(itemCreateInfo);
    oListItem["Title"] = "My New Item!";
    // set the lookup field value
    FieldLookupValue lookup = new FieldLookupValue();
    lookup.LookupId = item.Id;
    oListItem["Department"] = lookup;
    oListItem.Update();
    context.ExecuteQuery();
    You could refer to this article about creating/updating/deleting a new item with C# CSOM:
    http://www.c-sharpcorner.com/UploadFile/sagarp/create-update-delete-a-list-using-client-object-model-cso/
    You could refer to this article about updating multi-value lookup column:
    https://sunbin0704.wordpress.com/2013/10/11/update-multi-value-lookup-column-values-in-sharepoint-2010-using-managed-csom/
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected].

  • Set value of variable in one bean from another bean

    Using JDeveloper 11.1.1.4, I thought this would be simple to do, but I haven't been able to figure out the correct syntax and am just learning java. In my view controller I have one bean set as pageflow scope, and another bean set as a request scope. How do I set the value of a variable in the first bean from the second bean? The first bean has setters and getters, but when I try to reference them in the second bean, it says it isn't allowed. The first bean looks like:
    public class ViewAmtsParameters {
        String asOfDateParam = null;
        public void setAsOfDateParam(String asOfDateParam) {
            this.asOfDateParam = asOfDateParam;
        public String getAsOfDateParam() {
            return asOfDateParam;
    }Thanks in advance,
    Troy

    for ur reference: go through entire docs.
    http://balusc.blogspot.com/2006/06/communication-in-jsf.html
    Edited by: Erp on Oct 7, 2011 9:12 PM

  • How to add a new record(RowSet)  in another ViewObject in doDML method

    how to add a new record(RowSet) in another ViewObject in doDML method

    Re: An Entity/View Object attributes default values from other view object should help

  • SSRS Parameter value from another parameter

    Hello Everybody,
    I have a parameter that I need to get it value from another parameter.
    The first parameter @rdt is a date - 11/01/2012
    The second parameter @mm is the year and month = 2012
    I tried putting in a select inside the query but it did not work
    SET @mm =  (SELECT cast(year(@rdt) as char(4)) + cast(month(@rdt) as varchar(2)))
    Then I put it as a default value inside the parameter and it still did not work
    =cast(year(Parameters!rdt.Value) as char(4)) + cast(month(Parameters!rdt.Value) as varchar(2))
    Any ideas or suggestions ?
    Thanks in advance

    Hi Msj99,
    I have tested the expression provided by
    Visakh16 that it works fine , you will get the value as Integer type "YYYYMM", you can also use expression as below to get the string type of @mm (YYYYMM):
    =Year(Parameters!rdt.Value)&Month(Parameters!rdt.Value)
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • How to create a new row for a VO based on values from another VO?

    Hi, experts.
    in jdev 11.1.2.3,
    How to create a new row for VO1 based on values from another VO2 in the same page?
    and in my use case it's preferable to do this from the UI rather than from business logic layer(EO).
    Also I have read Frank Nimphius' following blog,but in his example the source VO and the destination VO are the same.
    How-to declaratively create new table rows based on existing row content (20-NOV-2008)
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf
    I have tried:
    1.VO1(id,amount,remark1) and VO2(id,amount,remark2) are based on different EO,but render in same page,
    2.Drag and drop a Createwithparams button for VO1(id,amount,remark),
    3.add: Create insertinside Createwithparams->Nameddata(amount),
    4.set NDName:amount, NDValue:#{bindings.VO2.children.Amount}, NDtype:oracle.jbo.domain.Number.
    On running,when press button Createwithparams, cannot create a new row for VO1, and get error msg:
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: For input string: "Amount"
    java.lang.NumberFormatException: For input string: "Amount"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    Can anyone give some suggestions?
    Thanks in advance.
    bao
    Edited by: user6715237 on 2013-4-19 下午9:29

    Hi,CM,
    I'm really very appreciated for your quick reply! You know, today is Saturday, it's not a day for everyone at work.
    My principal requirement is as follows:
    1.select/check some rows from VO2, and for each selection create a new row with some attributes from VO2 as default values for VO1's corresponding attributes, and during this process the user may be cancel/uncheck or redo some of the selections.
    --so it's better to implement it in UI rather than in EO.
    2.it's better to implement this function with declarative way as in Frank Nimphius' blog.
    --little Jave/JS coding, the better. I only have experience in ORACLE FORMS, little experience in JAVA/JS.
    In order to get full information for the requirements of my use case, can take a check at:
    How to set default value for a VO query bind variable in a jspx page?
    (the end half of the thread: I have a more realworld requirement similar to the above requirement is:
    Manage bank transactions for clients. and give invoices to clients according to their transaction records. One invoice can contain one or many transactions records. and one transaction records can be split into many invoices.
    Regards
    bao
    Edited by: user6715237 on 2013-4-19 下午11:18
    JAVE->JAVA

Maybe you are looking for