This discussion is archived
4 Replies Latest reply: May 27, 2009 11:26 PM by Tarek Fathy RSS

how to make item synchronize with another item

Tarek Fathy Newbie
Currently Being Moderated
hi
please i need help
i'm new with designer
i make a module using designer 10g
i have two items
item1 is employee salary
i want to make item 2 synchronize with item 1
I know it is very easy when using forms builder
but i do not know how to make it in designer

thanks in advance
  • 1. Re: how to make item synchronize with another item
    jflack Oracle ACE
    Currently Being Moderated
    I think you'll need to be clearer about what you are trying to do. I take it that when employee salary changes, something else needs to change too. I also think that you are probably using the Forms Generator. But beyond that, you haven't provided enough information for a good answer.
  • 2. Re: how to make item synchronize with another item
    Tarek Fathy Newbie
    Currently Being Moderated
    Another Example
    I have two Fields
    Filed number one is Employee name and it is a bound field.
    Field number two is x_employee_name and it is unbound field.

    I want filed number two to be synchronized with field number one

    In other words , when field number one is changed , Field number two will change automatically to be like field number one

    This is called synchronization

    This is very easy when using Forms Builder, it is just a property.

    But in designer, it is not exists.

    note:
    I do not want to write code on post-change or any trigger.

    Please help

    Edited by: tarekfathi_2@hotmail.com on May 27, 2009 10:19 AM
  • 3. Re: how to make item synchronize with another item
    jflack Oracle ACE
    Currently Being Moderated
    I use the Web PL/SQL generator, not the Forms generator, so I'm not totally sure that this will work for you, but this is easy to do. When you define the unbound item, define it as a SQL Expression. Then use whatever function that will fill the unbound item the way you want. For instance, I have bound items NAME_FIRST, NAME_MIDDLE, and NAME_LAST, and want to create an unbound item to display them as a single string. So my SQL Expression is
    NAME_FIRST||' '||NAME_MIDDLE||' '||NAME_LAST
    You can even use a DECODE function or a CASE expression if you need some logic.
    My unbound happens to be display only. It can be made updatable, but that WOULD require a trigger to do something with the data, like update a bound item - no way around it.
  • 4. Re: how to make item synchronize with another item
    Tarek Fathy Newbie
    Currently Being Moderated
    jflack

    Thanks So much for your great help.
    Your solution works fine and solve my problem.
    I defined the unbound items as a SQL Expression and it works fine
    Thanks again for your help

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points