7 Replies Latest reply: Nov 25, 2013 11:32 AM by Andreas Weiden RSS

    Must be able to query on both the Data-Blocks at a single click.

    Vijetha

      Hi all , help me with the following problem.

       

      There are 5 data-blocks in the form,

      I want the cursor to navigate to two blocks at a time after I press a push button (ENTER_QUERY) ,

      means when I press 'ENTER_QUERY', if I click on a field of block1, it must allow me to enter the data in fields of block1,

      or if i press on block2, it must allow to enter the data in the fields of block2.

      I'm unable to click on both the blocks at the same time.

      I want to do something like this:

       

      PUSH BUTTON : ENTER_QUERY: TRIGGER:WHEN BUTTON PRESSED:

      ENTER_QUERY;

      IF PARA='ENGG' THEN

      GO_BLOCK('BLOCK1');

      set_block_property('BLOCK1', enabled, property_true);

      set_block_property('BLOCK1', query_allowed, property_true);

      OR

      GO_BLOCK('BLOCK2');

      set_block_property('BLOCK2', enabled, property_true);

      set_block_property('BLOCK2', query_allowed, property_true);

      ELSE

      EXIT_FORM;

      END IF;

      END;

       

      I must be able to query on both the datablocks. how do i do this?

       

      Thank You.

        • 1. Re: Must be able to query on both the Data-Blocks at a single click.
          Vijetha

          Or Can i do something like this???

           

          PUSH BUTTON : ENTER_QUERY: TRIGGER:WHEN BUTTON PRESSED:

          ENTER_QUERY;

          IF PARA='ENGG' THEN

           

          if mouse_click on BLOCK1 then

          GO_BLOCK('BLOCK1');

          set_block_property('BLOCK1', enabled, property_true);

          set_block_property('BLOCK1', query_allowed, property_true);

          else if mouse_click on BLOCK2 then

          GO_BLOCK('BLOCK2');

          set_block_property('BLOCK2', enabled, property_true);

          set_block_property('BLOCK2', query_allowed, property_true);

          end if;

          ELSE

          EXIT_FORM;

          END IF;

          END;

           

          How do i do this????

          • 2. Re: Must be able to query on both the Data-Blocks at a single click.
            rgvg

            why do you need to click on a button so that you can navigate to a block? why not just click on an item in the block so your cursor moves there?

            in any case, the cursor can only really be in one block at a time. maybe you are having trouble "clicking" on the block because you have disabled the block. you can only move your cursor there if it enabled.

            • 3. Re: Must be able to query on both the Data-Blocks at a single click.
              Vijetha

              Ya, you are right. The block is being disabled.

              But i want to know how can i query on 2 fields of two different blocks???

              • 4. Re: Must be able to query on both the Data-Blocks at a single click.
                Andreas Weiden

                Only one record can be in query-mode at a time, so you can't query two blocks at the same time using standard-functionality.

                 

                But what you can do:

                 

                1. Create a non-db-block with those two items you want to query on. Let

                2. Let the user enter his query-cirteria there.

                3. On Kex-Exeqry do something like

                 

                GO_BLOCK('BLOCK1');
                EXECUTE_QUERY;
                GO_BLOCK('BLOCK2');
                EXECUTE_QUERY;
                

                and in the PRE-QUERY-trigger of the two blocks do the actual restriction

                 

                :BLOCK1.ITEM1:=QUERYBLOCK.ITEM1;
                
                • 5. Re: Must be able to query on both the Data-Blocks at a single click.
                  O.Developer

                  HI

                   

                  First  tell us your exact working requirements  with  block name  and link to each block.

                   

                  Further  if you apply  master-details  relationship -  If you enter on one block- related block data will be populated  automatically.  Based on this relation you can keep extend to all other  data block per requirement.

                   

                  Post here your  question after going thru above steps

                  • 6. Re: Must be able to query on both the Data-Blocks at a single click.
                    Vijetha

                    Thank You, but what i meant by "query two blocks at the same time" was, if i click on enter_query, i must be be allowed to query on either block-1's item or on block-2's item depending on which block the user wants to query.

                    The problem i'm facing here is, when i run this form, the cursor goes to the block-1's item_1 (this item is the one through which i have created master-data relationship with the other block that is block-2) , when i click enter query, the cursor remains in the same block (block-1's item_1), even if i click on block-2's item, the cursor does not move to block-2's item, I'm forced to query on "block-1's item_1".

                    The other part of it is, when i run this form, the cursor goes to the block-1's item_1, i'm able to click on block-2's item, the cursor moves there before i click enter query. So, after i click on block-2's item, then click enter query, the cursor is in block-2's item.

                    But i want is that after i click on enter query , i must be able to query on which ever block's item i want to , be it block-1's item or block-2's item or block3's item.

                    • 7. Re: Must be able to query on both the Data-Blocks at a single click.
                      Andreas Weiden

                      Thank You, but what i meant by "query two blocks at the same time" was, if i click on enter_query, i must be be allowed to query on either block-1's item or on block-2's item depending on which block the user wants to query.


                      yes, i understood that, but it is not possible.If the user wants to query block1, he has to move to block1 and then press ENTER_QUERY, if he wants to query block2, he has to move to block2 and press ENTER_QUERY.