Forum Stats

  • 3,782,078 Users
  • 2,254,593 Discussions
  • 7,879,912 Comments

Discussions

Function call to populate a field

PT
PT Member Posts: 68
edited Nov 6, 2019 5:26AM in Forms

I need to populate a text field(status) based on the function output. This has to be called once for the form.  I have added a text field in a block blk_1. Please let me know where should I add the function call to populate this field status.

Function need the input parameter which is passed to that form.

Tagged:

Answers

  • Holger.Lehmann
    Holger.Lehmann Member Posts: 439 Silver Badge
    edited Nov 6, 2019 1:48AM

    if yout block is based on data, you could put it in a POST-QUERY trigger.

    for each row populated from db the function is executed.

    Regards

    Holger

  • PT
    PT Member Posts: 68
    edited Nov 6, 2019 2:44AM

    Post query trigger worked only if there is some data populated in the block else it not getting triggered.  I want the function call to happen once per form irrespective of the data in the block. Please suggest the correct trigger to use in this case.

    Tried When New form instance trigger: The input parameter required for the function was not available at this point.

  • cormaco
    cormaco Member Posts: 1,771 Bronze Crown
    edited Nov 6, 2019 3:26AM

    You can use the WHEN_NEW_FORM_INSTANCE trigger.

    At form start-up, Oracle Forms navigates to the first navigable item in the first navigable block. A When-New-Form-Instance trigger fires after the successful completion of any navigational triggers that fire during the initial navigation sequence. 
  • PT
    PT Member Posts: 68
    edited Nov 6, 2019 5:13AM

    At WHEN_NEW_FORM_INSTANCE trigger level we did not get the input parameter value which is required for function call. So could not use this.

  • cormaco
    cormaco Member Posts: 1,771 Bronze Crown
    edited Nov 6, 2019 5:26AM

    How exactly are you passing this parameter into the form and how do you reference it?