Change Value based on Dynamical Object

Goal:
The goal is to make the variable with value '2014-06-14 09:00:00.000'
Problem:
The syntax code is created as a dynamical object how do you make it from '2014-06-14 16:20:10.000' into value '2014-06-14 09:00:00.000'?
DECLARE @a datetime = '2014-06-14 16:20:10.000'

Are you looking for this?
DECLARE @a datetime = '2014-06-14 16:20:10.000'
select dateadd(hour,9,convert(datetime,convert(date,@a)))
set @a = '2014-06-14 08:20:10.000'
select dateadd(hour,9,convert(datetime,convert(date,@a)))
Satheesh
My Blog |
How to ask questions in technical forum

Similar Messages

  • Changing values based on input

    I have a form with a input field labeled Single Qty and a
    field labeled Unit of Measure, which defaults to EACH.
    We have addes a new field labeled Multiple Lots Qty.
    What needs to happen now is that if an entry is made in the
    Single Qty field, the Unit of Measure remains EACH. If an entry is
    made in the Multiple Lots Qty field, then the Unit of Measure
    should change to LOTS.
    How do I do this ?
    Thanks

    "If I input a value into the multiple lots qty, I want the
    unit of measure to be replaced by Lots, in the unit of measure
    field, before the form is submitted.
    I know the unit of measure can be determined after the form
    is submitted, but I need it to display on the form before it is
    submitted, if possible. "
    If you want to change the values "before" the form is
    submitted, you need to use javascript..
    If you dont understand how to use
    document.myform.formname.value, then I would reccommend learning
    some basic javascript before you start writing code with it.

  • Changing fields based on database values

    Hi all,
    I have one form and two drop -down fields. The fields are Call Type and Sub Call Type and are on the SAME form. I pull data from the Call Type from the database. When the user selects a particular Call Type, I need to go back to the database and pull in values associated with that particular Call Type.
    This is the method, that I am using:-
    1) I first populate the Call Type drop down field by using a Server Side Method to fill in values for the Call Type and calling the database.
    2) I then call a method called as PopulateSubCallType by using the property On Change Invoke for the Call Type field.
    In this method I again call the database and based on the Call Type selected by the user, I pull in the associated Sub Call Types and store them in an array.
    3) I also call the same array to populate the Sub Call Types based on Call Types. But the drop down field for Sub Call Type is not auto-populated based on the values from the array. The array values although pulled up from the database are not shown on the form.
    Can you tell me a way to auto-populate the Sub Call Type from the database based on the Call Type selected by the user but on the SAME form.
    I AM NOT USING JSP's but ONLY ALBPM 6.0 PRESENTATIONS.

    refreshValidValues("someAttribute") is a method that comes with BPM Object presentations.
    This one line in this method will work because it causes the attribute (child in this case) to automatically invoke the method you created for retrieving the valid values of the children of the parent.
    Your server side method that dynamically returns valid values of the children based on the parent selected should be looking something like this:
    for each ...
    select * from child
    where parentOfChild = parentAttribute
    In this example the name of your parent attribute is "parentAttribute" column in the child database table that contains the parent's id is "parentOfChild".
    This causes the list of children to auto populate in the child combo dropdown automatically.
    To summarize - at runtime here is what happens:
    a) since the parent has a dynamic method that populates its valid values, as the presentation initializes the SQL for the valid values of the parent is run.
    b) the parent's combo dropdown is populated with a list of valid values of the parent
    c) the end user selects one of the parent's names from the combo dropdown
    d) this causes the method to fire that has only one line. This one line has the text "refreshValidValues("nameOfTheChildAttributeGoesHere")
    e) since the child has a dynamic method that populates its valid values, when the previous step caused this child attribute to refresh its valid values, the SQL in the method that dynamically retrieves the valid values of the child is run.
    f) the end user clicks the combo dropdown on the child's attribute and sees that the child valid values (based on the parent that was just selected) now appear.
    Dan

  • Change Value A based on Value B in Web UI in cross component

    Hi Friends,
    I have a requirement to populate value A based on selection of value B in differenet component.
    I have a web ui screen to create a complaint ( Component A ). After saving when I am clicking on follow up button, it will take me to next web ui screen ( Component B ) i.e. service order. Here I have a status field and after its selection when I have save. I also want to change value A of component A field.
    Kindly suggest..how can I achive this.
    Regards,
    Narendra Goyal

    Hi Narendra,
    It depends on what the exact fields are. If you change a value in component A and this change goes to the BOL layer, then this changed value should always be accessible in component B if you use the same BOL object and BOL relation to access the data. And you can always change the value from component B and it should already change in component A. The only thing you need to ensure is to call publish_current( ) method on the node where you change the value or call a BOL code modify( ).
    Regards,
    Shiromani

  • 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 change the value in an Integer object?

    Hi,
    Is it possible to change the value that is contained in an Integer object.
    I know Integer objects are immutable. So it might not be possible to chage to value in an integer object once its been initalized a value @ the time of construction.
    Also does autoboxing and unboxing feature of 1.5 help acheive this?
    Please let me know of any other alternative
    Thanks
    Deepak

    Tried the autoboxing and unboxing feature doesnt
    help.It doesn't help in general. But in this special case it doesn't help because it doesn't anything to do with it. Do you really know what you're doing?
    So across the function its not changing the value.
    As I have created an object of Integer class and
    passed a reference of that object into the chage()
    ,So any changes should have been reflected
    acrosss method calls.?Since you let the newly created parameter-reference a point to a new Integer object: no. Why? You have two references to I(31). Then you move one reference to I(33). Why should 31 get another value?
    Does the the java compiler creates a new Integer
    object each time it does autoboxing Not necessarily. Some values are pooled. Actualy, the JVM does it. The compiler never creates any object.
    so that the value
    is lost across method calls?That's not the compiler's or the JVM's fault. It's all a misconception of yours.
    Is there any means to achieve this?What for?
    int a = 0;
    a = change(a);
    int change (final int i) {
      return i + 12;
    }Does exactly what you want, without side-effects.

  • How To dynamically change values in custom form

    Hi,
    Requirement is to change values in custom form dynamically that are passed by Global variables through standard form .
    I have used forms personalization to call custom form and passing some parameters to custom form using global variables.
    Now i have to change values displayed in custom form(already opened) when user moves from one record to another record.
    I cannot change the standard form.Only i have write logic in custom form that dynamically changes values as user moves from one record to another in standard form.
    Global variables values will be different for each record.
    Pls let me know how i can achieve this.
    Regards
    Udit

    Udit,
    Your question should be posted to the Enterprise Business Suite (EBS) forum. This forum is dedicated to non-EBS forms development.
    Craig...

  • Value help based on this object not supported.

    Hi,
    I am new to VC, i want to create search help for a field create by own. it is "z_date" and restricted by "0REDAY1".
    when i click on "Add Value Help" and proceed further it gives me an error stating " value help based on this object is not supported"
    Thnaks,
    Sonali.

    Hello
                  I believe the common mistake made here is that you are trying to create value help under the "VARIABLE" drop down . you can only create value help on the "CHARATERICTICS" .
    so to solve you problem please identify the INFOOBJECT associated with that variable and create value help on that.
    if this doesnt help  please let me know

  • Best approach to change values in .properties file dynamically

    Hi ,
    I am using Jdev 11.1.1.5 . I wanted to change the values used in .properties file (like say a fe email addresses which happen to be different for Test/Prod/Dev instances) dynamically using something like a deployment plan.
    One way to do the same is to include it in a shared libary and do a one -time deployment to the server.
    Are there any better ways like a deployment plan , which unfortunately I think can change values dynamically on for web.xml , weblogic.xml type of files.

    I am using a shared library which takes care of the cases mentioned above.

  • Changing a boolean value based on two buttons

    I know that this is a ridiculously simple question, but I've been having trouble with it.
    How would you set a boolean value based on the input from two other boolean values? Essentially what I want, in pseudocode, is this:
    boolA = true
    if (boolB)
         boolA = false
    if (boolC)
         boolA = true
    It should be really simple to do, but I can't figure it out. The problem is getting it to stay false, for example, after boolB goes back to false, and not just to have it only momentarily go to false. I want it to stay false until boolC goes to true, regardless of what boolB does after that. Any advice?
    Thanks,
    Logan Williams

    I would say implies is close to what was asked for.  However, the only issue is that for the case where both B and C are false, the logic shows that there is no change to A.  It is initially True, but if it happens to be False because of further changes, there is nothing in the If statements to change the logic.  And that is what is asked for.  That the Result stays False even when B goes back to False.  But the Implies function says that  F and F must be True.
    As described
    B         C         Result A
    T          T          T (because C is evaluated 2nd)
    T          F          F
    F          T          T
    F          F          x (initially T, but the code shown and what is asked for is actually no change from previous state)
       Implies Truth Table
    B         C         Result A
    T          T          T
    T          F          F
    F          T          T
    F          F          T

  • Change Column Value based on Characteristic in Rows

    I am not sure it is possible.
    We have product prices at different levels of customer hierarchy.
    Channel > Division > Region > Market
    One Region can have multiple Markets.  Each market can have different Rates.  But the Region will have a different Rate which many not be the average rate of all market (assigned as part of master data)
    I have a column for Product Price.  So when a Report is run at Market Level it should use Market Rate.  If Market is Removed and Region is dragged into the report it should use Region Rate for Product Price.
    Product Price is Restricted by Rate Type value to determine which Rate is used.
    Is there a way to dynamically determine the define the column value based on the characteristic value in the ROWS.
    Thanks

    Hi,
    For every CHAR like Market/Region there will be some key. For example Maket1 = 11 and Market2 = 22. If that key is a number then you may create replacement path variable on that and convert the same in numbers then you may create various CKF (for various rate type) and put "If" condtion and check for those replacement path CKF and use the apprpriate one.
    You need to write some tricky formula at CKF levels. This is one of the way to achieve that.
    I hope it will help.
    Thanks,
    S

  • How to find user ids based on authori object & values.

    Hi all,
      I am trying to find User master records based on
    Authorization object - M_EINK_FRG ( realease strategy for tocde ME28 - MM)
    values -
    code --VP
    GRP - 01
    I found some time before with Tcode SUIM using trail and error method.
    I am trying it again but not possible. is there any easy method or report to pull out this info.
    Thanks
    Satheesh

    Hi Satheesh,
    SUIM gets the data from many tables and is the best solution for searching an user based on the authorization object.
    You will find the auth object in SUIM.
    SUIM->User->Users by complex selection criteria>by authorizations>Auth Object->execute->select a user>click on selectively expand the tree--->execute based on auth obj.
    Rakesh

  • FR Change text value based on another member

    Hi,
    I using FR 11.1.1.3
    I'm trying to change the value of a data cell based on the value of the time dimension, so below is what I'm trying to do
    Change value to Quarter1 - 2012 if current point of view for time2 is Quarter1 and Current Year is 2012
    Change value to Quarter2 - Current Year if current point of view for time is Quarter2
    and so on
    Quarter1 and Current Year are coming from different dimensions.
    Please let me know if this is possible to do in FR
    I can easily do this in IR.
    Thanks

    Hi VS
    No problem it is always a bit open to interpretation when someone posts in these forums :-)
    So it sounds like you want to use Text based headings rather than data. Have you looked at the text functions rather than tring to do this with formulas. i think you might have more success using text rows and referencing the rows containing the member names, e.g. if you have two dimensions Period and Year (both in rows) then make use of the following function:
    Generic syntax:
    <<MemberName("GridName", Row/Col/Page, "DimName")>>
    Example:
    <<MemberName("Grid1)", 2, "Period")>> - <<MemberName("Grid1)", 2, "Year")>>
    should return the name of the member from the Period dimension from row 2 and the member of the Year dimension from row 2, e.g. Qtr1 - FY12
    There is a practically identical function MemberAlias too if it is the alias you want rather than the member name. Have a look in FR studio by inserting a text row / column and then trying to insert function. There are also 2 that you can use that are no longer show in FR studio or the studio user guide but do work (or at least did up until v11.1.1.x) and that is POVMember/POVName (can't remember now!) and POVAlias used to get the member/alias from the POV for a partcular dimension, syntax for that is:
    <<POVAlias("Grid1", "DimName")>>
    Hope this helps
    Stuart

  • Change column value based on another

    Hi, everyone.
    my version 11.1.2.2.0.
    i wanna change 1 column's value based on another column's value that be selected.
    ex: select 2rd column to 'A' , then the 1rd should be 'New Start'.
    i used EL like #{row.bindings.MacdType.inputValue eq 1 ? 'New Start' :  row.bindings.CircuitId.inputValue}.
    But it does not set the inputvalue which should binding with the DataSource.
    what's the best way to do these logic?
    pls help. thx

    Hi,Abhijit;
    ex: the frist column is a LOV, the user select "A" for the first column, so the value of the second column should be changed to 'New Start'.
    And the value should be binding to the DC, when save, the value of the 2rd column should be saved to DB.
    thx

  • Change value of option button (OLE object) in Microsoft Word file

    Hi guys,
    I would like to convert a macro from VBA to AppleScript. Unfortunately, I'm the beginner of AppleScript and I don't know how to change value of an option button in Microsoft Word.
    For example, I have an option button with 2 options (group name = question413) Yes and No. Now, I would like to open Word file, then change value of option button with group name "question413" to Yes. Below is my code in VBA.
    SetOptionButton "question413", "Yes"
    Public Sub SetOptionButton(GroupName As String, Value As String)
    Dim oShape As Word.InlineShape
    For Each oShape In ActiveDocument.InlineShapes
    If oShape.OLEFormat.ProgID = "Forms.OptionButton.1" Then
    If oShape.OLEFormat.Object.GroupName = GroupName Then
    If oShape.OLEFormat.Object.Caption = Trim(Value) Then
    oShape.OLEFormat.Object.Value = True
    Else
    oShape.OLEFormat.Object.Value = False
    End If
    End If
    End If
    Next
    End Sub
    How could I convert them to AppleScript?Any comments would be highly appreciated.
    Thanks,

    Hi
    Theirs a pretty in depth tutorial over at MACTECH, which I think will aid your in your code transition
    Moving from Microsoft Office VBA to AppleScript:
    MacTech's Guide to Making the Transition
    http://www.mactech.com/vba-transition-guide/index.html
    Budgie
    Message was edited by: Budgie
    Their is also the possibility you could use the "do Visual Basic" command, not to sure about thta though

Maybe you are looking for

  • Pop-up menu displaced

    I have had this problem on two separate websites. I am using Fireworks-originated graphics and popup menu in a Dreamweaver template. On only one page on the website, my pop-up menu is appearing in the wrong place. Example (hover over "Teams & Schedul

  • Automatic buyer assignment on Purchase Orders

    Is it possible to change the buyer assignment hierarchy? We currently assign a buyer to most categories. Requisitions are then assigned a buyer dependant on category selection. If a requisition is linked to a CPA or BPA, the PO is automatically creat

  • How do I create different contacts lists for two iphone/users?

    How do I create different contacts lists for two iphone/users?

  • Subcontracting Material return date after 180 days

    Dear all, We have issue while reconcilling challan against material documents,some cases excess cosumption/under consumption while doing GR & Single GR is done for different challans, due to this we are unable to close challan against return date,now

  • Samsung Continuum Froyo Update Problems

    Hello, Verizon pushed out the update to Froyo Android 2.2.2 to my Samsung Continuum earlier this month (about 15 months after they said they would when I bought the phone). The download and install went smoothly for the most part, but there are some