Sorting at Form Level
Dear All,
thanx for my earliar queries, tahnx a lot.
i am working on Forms 6i / Oracle 8i.Actaully, i need to sort some records on form level, which i got populated in the form one-by-one by the primary key.
pls, suggest me how to proceed.
Inderjeet Singh
It's not Forms that does the sorting, but the database. That's why you modify the ORDER BY clause of the block; Forms passes it to the database which modifies the query accordingly.
So one option is to base your block on a view, which can include your derived field. This is useful for sorting on things like foreign key lookups.
If the thing you want to sort is not in the database, then you can implement your sort using PL/SQL and manipulating the blocks using the block and record built-ins.
Regards,
Robin Zimmermann
Forms Product Management
Similar Messages
-
Ontext menu at form level text items
Hi, I want to know how we can create a context menu at form level text items.
like i want a context menu at column level for following options copy, hide, show, set filter, find, sort in ascending and descending order.
I will be highly obliged.Hello,
Create an internal menu (popup menu node in your form module), then attach its name to the corresponding item (fonctionnal -> popup menu)
Francois -
Select Sorting at prompt level
Hi,
How to select sorting parameter from prompt level? I have followed the thread [Select Sorting in prompt level |Re: Select Sorting in prompt level;. I got struck while creating " Prompt - Sort Order" object. How to do this?
Regards,
Malini.VHi folks,
I am a report designer and I use BOXI r2 sp4. After researching the boards, I asked my design team to create the Sort-Order prompt object at the universe level.
From what I understood, they created it in an independent dervived table. I need to have it joined to another table that contains the "measures" but I don't know what kind of joins should be constructed.
In the report, I'd like to use it for something like the following:
>if(Prompt - Sort Order="Descending";cost of service)...
I would greatly appreciate the advice of the SMEs on how to complete this requirement.
Wannetta
Edited by: Wannetta Thomas on May 18, 2009 7:49 PM -
Duplicate item checking failed in Form level-urgent
Hi all
i have creation page with advanced table
i need to restrict the duplication at form level as well as save button
in some cases the validation is failed
if ("CodeValidation".equals(pageContext.getParameter(EVENT_PARAM)))
itemcode = vo.getCurrentRow().getAttribute("ItemCode").toString();//advanced table multiple records come
am.xxItemCodeValidation(itemcode);//checking the item validation at databse level
am.xxdupitemcode(itemcode);
method in am
public void xxdupitemcode(String itemcode)
System.out.println("The item code is.........."+itemcode);
int count = 0;
xxcrmNewItemVOImpl vo = getxxcrmNewItemVO1();
vo.executeQuery();
System.out.println("the row are" + vo.getAllRowsInRange().length);
Row r[] = vo.getAllRowsInRange();
int n = vo.getAllRowsInRange().length;
for (int i = 0; i < n; i++)
System.out.println("entered into this block......for loop" + count);
if (itemcode.equals(r.getAttribute("ItemCode")))
System.out.println("entered into this block......" + count);
count = count + 1;
System.out.println("the count is........."+count);
if (count > 1)
throw new OAException("Duplicate Item found plz change the item",
OAException.ERROR);
} else
System.out.println("Exception block....... ");
in save button i am calling
if ("Save".equals(pageContext.getParameter(EVENT_PARAM)))
am.xxdupitemcode(itemcode);
am.invokeMethod("xxsavetr");
in which case it is failing is
in first row user enter
ROW-ITEMCODE
1-A
2-A
3-B
4-B
in second row and 4 th row exception is raised but user didnt change the itemcode and proceed for next steps
IN SAVE BUTTON EXCEPTION IS RAISED
but user will go to 4 th row and B should be change as C and click on save
records are saving with duplication item of A
but i need to restrict in save button also
how its posible
Regards
SreekanthSreekanth,
The correct way to check for duplicates is to check it both in the VO/EO cache as well as the database. It is possible the user entered duplicate value in the current session. In that case you should first check within the existing VO rows if the values are duplicated or not (in case all the database rows are already queried, you might not need to run an explicit query, otherwise another validation VO needs to be executed to check for duplicates).
Regards
Sumit -
Block level trigger vs form level trigger
Hello.
I want to know what is better - to use block or form trigger?
I have many blocks in my form. I need to write custom code in (for example) key-crerec trigger.
Should i put trigger into each block or should i create one at form level like:
if :system.current_block = 'BLOCK1' then
create_record;
elsif...
end if;
Thanks.
Message was edited by:
DejanHHello,
If you have to handle this stuff in more than one block, it seems more generic to put the code in a form-level trigger if you don't want to duplicate it several times.
Francois -
When-validate-item at form level do not fire
Hi, I wrote a when-validate-item at form level to do same check in all items of a screen and note that this trigger do not fire when executing the form. does someone know why this form-level when-validate item do not fire. Are there some conditions i probably forgot to have? Thnaks very much.
Hi, if you also have a validate-item trigger on the item itself, this may be overriding the form-level validate item.
At the ITEM-LEVEL:
if a when-validate-item trigger exists and the Execution Hierarchy property of the trigger is set to override then the item-level trigger will fire instead of any trigger by the same name at any higher scope.
So make sure you do not have validate-item triggers at the item or block level that may be overriding the form-level when-validate-item.
To see the properties of a trigger, highlight the trigger and press F4
Hope this helps! -
How to apply sorting for each level of a hierarchy?
I'm using SSAS OLAP and I want to apply sorting of the levels of a hierarchy.
I know that I can sort the whole hierarchy via ORDER function (I have some issues when I'm trying to apply DESC sorting
on the whole hierarchy), but what I really want to achieve is sorting of a specific level. For example in the [Date].[Calendar] hierarchy (Adventure Works Cube), I want to have ASC sorting
of years, DESC sorting of Quarter, ASC sorting
of Months, etc. I do not want to break the hierarchy (using BASC or BDESC), I just need them sorted on the same level. Do you have an idea if this is possible at all?
My idea is to sort the levels based on their key, not by the measure. For example if we have the following structure:
-2009
-Q1
-Jan
-Feb
-Q2
-May
-June
-2010
-Q1
-Jan
-Feb
-Q2
-May
-June
I would like to be able to sort the data in the following order (DESC for years, ASC for Quarters, DESC for months):
-2010
-Q1
-Feb
-Jan
-Q2
-June
-May
-2009
-Q1
-Feb
-Jan
-Q2
-June
-May
Thanks in advance for your help!Hi Rosen,
According to your description, you want to sort the different hierarchy members in different order, right? Generally SQL Server Analysis Services doesn't provide a way to sort dimension members in Descending order. SSAS provides only Ascending order. We
can achieve this sort functionality by using a simple trick. However, the order is used for all the members of different hierarchy under this dimension. So I'm afraid that your requirement cannot be achieved.
Reference:Sort Dimension Members in DESCending order
Thank you for your understanding.
Regards,
Charlie Liao
TechNet Community Support -
Form level v/s item level trigger in oracle forms
Hello Experts,
I am new in oracle forms.I am using forms 11g with weblogic server 10.3.5 at windows 7.I am very confused between Form level and item level triggers.What is the sense of use of when-button-pressed trigger at item level & form level.If I have this trigger form level then how could I check that is fired.
Thank You
regards
aaditya979801 wrote:
Hello Experts,
I am new in oracle forms.I am using forms 11g with weblogic server 10.3.5 at windows 7.I am very confused between Form level and item level triggers.What is the sense of use of when-button-pressed trigger at item level & form level.If I have this trigger form level then how could I check that is fired.
Thank You
regards
aaditya
You need to clear you concept first..
Form level Trigger: code applied all respective item within the form
Item level Trigger: code applies for only the item that has the code.
try in a form and you will see the difference.
Hamid -
Form level Trigger Vs Block Level trigger
I have a form with single Database Block. I need to write a
transaction Trigger for this Block. I need to know r there any
advantages of writing the triggers at Form Level rather than at
Block Level.
Thanx in advance
--- Moneesh Walia
nullHello,
If you have to handle this stuff in more than one block, it seems more generic to put the code in a form-level trigger if you don't want to duplicate it several times.
Francois -
Hi all,
I need trigger function, their execution preference at form level. and when we execute query and go to next record
which trigger fires at this stage at form level.
Regards
Rizwan AliIf you are running your form from the Forms Builder, try turning the Debug Messages on. This will show an alert for each trigger that fires. This will let you see what triggers fire throughout your form. This is very helpful in learning the firing sequence of triggers in forms.
To turn this feature on go to the Edit Menu -> Preferences -> Runtime tab -> Debug Messages checkbox. While this is a handy feature - just don't forget to turn it off when you are finished as it can be quite annoying when you don't want it turned on. ;)
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly. -
hi all,
i am using Forms 6i.
in a form level trigger, there is a code of around 2600 lines.
while compiling the form it is showing an error 'Program too large'.
is there any limitation on size?
please suggest something.
Regards
PantherHawkHi,
I think you are getting PLS error from the database.
Yes there are limitations.
Refer :
http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14261/limits.htm
ORA-06540 ORA-06553 PLS-00123
and
Check Note: 62603.1.
Nilaksha. -
Forms Level commit/rollback on different environment.
Hello everyone,
I would like to share and seek suggestion on the following case.
I have a posting form F1 which on saving, post 2 transactions let say Credit and Debit. On a form level key-commit, all posting code is written. Now I enter some data and press save button on the form. System will
Post Trans 1
Post Trans 2
If no error, then commit;
Now let say Trans 1 was successful, Trans 2 was unsuccessful, but as both were not successful (due to known reason) therefore, system does not commit any transactions and display me the error message. OK but transaction were not rollback.
Now remaining on same form, I make 2 other transactions
Post Trans 3
Post Trans 4
Now both the transactions were successful and system commit the form. BUT, system post 3 transactions Trans 1, Trans 3 and Trans 4.
Now the main problem is here that I have 2 environments server (different machines), A and B. The same case is replicated on server A but the same case is not able to replicate on server B. On Server A system post 3 transaction but on Server B system post only 2 transaction correctly. I have tried many times with same scenario.
What could be the setting that on server B, the Trans 1 is rollback but on Server A Trans 1 is not rollback? I AM USING SAME FORM and place same version on both the environmentWould you mind explain a little bit more? By now I have not the faintest clue what you mean (except something like: A does not work when B is C on the server D when E is F).
1.) Please mention the versions you are using (FULL Forms AND Database Versions e.g. Database 10.2.0.5 and Forms 10.1.2.3).
2.) What kind of Servers are "Server A" and "Server B"?!? File Servers where your fmx files are located?!? Database Servers? Application Servers?
3.) Is it possible to post the code you are using? You might have a bug in your code but except the information that it doesn't work as desired you didn't give us much to work with.
If you post your code please format it proper with tags so we don't get eye cancer by reading 20000 lines of unformatted code ;).
cheers -
Ni9263 : 2 sorties de forme différentes
Binjour, j'uitlise le Ni cDAQ 9174 avec un module 9263. Je souhaiterais faire sortir 2 signaux différents. C'est à dire un sortie continue 5V et une sinusoidale 0-10V en pilotant la frequence..Tout ça en meme temps.
Est ce possible? je n'y arrive pas. Mais je pense que ça doit etre tout bete.
Merci beaucoup
MathieuBonjour,
Le module 9263 possède un convertisseur « digital vers analogique » pour chacune de ses 4 sorties analogiques, avec, en outre, un rafraîchissement des voies simultané. Il est donc possible de produire 2 signaux simultanés sur 2 sorties analogiques différentes. En outre, la technologie du Compact DAQ 9174 est également adaptée à ce type de besoin. Vous pouvez donc piloter plusieurs sorties analogiques en même temps. Si vous souhaitez plus d’informations sur le Compact DAQ en question ainsi que sur la technologie de synchronisation et de cadencement qu’il contient, vous pouvez consulter les liens suivants :
User Guide and Specifications NI cDAQ-9178/9174
NI-STC3 Timing and Synchronization Technology
Si vous souhaitez obtenir deux signaux en sortie d’une façon simple, vous pouvez générer vos signaux à l’intérieur d’une même tâche.
Voici un petit exemple basé sur 2 waveformes (qui sont paramétrables, bien sûr) afin de vous aider dans la conception de votre VI.
Le formalisme pour indiquer qu’on travaille sur deux voies physiques (par exemple sur la carte « Dev1 » en ao0 et ao1), mais dans la même tâche est le suivant :
On déclare dans la commande Physical Channel Dev1/ao0 :n (pour utiliser toutes les vois de 0 à n) ou Dev1/ao0, Dev1/ao1 (pour utiliser les voies ao0 et ao1 seulement).
Vous trouverez également plus d’exemples pour vous aider dans la recherche d’exemples LabVIEW, aux rubriques « E/S matérielles/DAQmx/Génération analogique/Tension ».
J’espère que ces quelques éléments vous permettront de progresser dans la résolution de votre problème.
Cordialement,
Guillaume H.
National Instruments France
#adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
>> NIDays 2011, le mardi 8 février au CNIT de Paris La Défense
Pièces jointes :
Support 2 sorties de forme différentes.png 39 KB -
Force Form to Execute builtin trigger at form level
Hi,
I have form 10g R2 I put PRE-UPDATE trigger at block level and Form level but I when I update a record it executes only block level update trigger, I want to execute both builtin at block as well as form level, is there a way.
Thanks and Regards, Khawar.
Message was edited by:
S. KhawarI created a test form (Oracle Forms 10g r1) that hits the EMP table in the SCOTT schema. In the form, I added a Pre-Update trigger at the Form and Block level. With the "Execution Hierarchy" (EH) left at the default Override, saving my form caused only the Block Pre-Update trigger to fire. Changing the Block EH to Before and the Form EH to After caused the Block Pre-Update to fire first followed by the Form Pre-Update. I then changed the Form EH to Before and the Block EH to After and tried it again. This time, the Save caused the Form Pre-Update to fire first and the Block Pre-Update to fire second. Therefore, S.Khawar, depending on which Pre-Update trigger you want to fire first, I suggest you set the Execution Hierarchy accordingly.
That was an fun little exercise. I've had this discussion with people before, but never took the time to throw together a test case to confirm what really happens in a Form. Steve - thanks for raising the question! :-)
Craig... -
I want to declare a form level variable and want to assign a value at WHEN-NEW-FORM-INSTANCE trigger and i want to use the same value in Program units as well as other form level and block level triggers. How to achieve this? Do i need to refer the variable with :Symbol? Thanks!
Chris,
There are a couple of ways to do this. As Ammad suggested, you can use a Global variable, but as you point out - Globals are visible to your Forms session unless you destroy the global. You can also use a Parameter as you have done or you can use a Control Block with a block item that will accept the type of data that will be stored in the variable. There are limitations with each of these options however.
With Globals, all variables are of CHAR datatype and are limited to 4000 bytes in Forms 10g and higher and 255 in Form 9i and lower. Any non-character value stored in a global must be converted back to it's native datatype when you read the value to ensure it is evaluated correctly. When globals are declared, they always reserve the max amount of memory needed to support the 255 or 4000 characters. If you use Globals, it is a good habit to use the Erase() built-in to destroy the Global when you are finished with it. Also with Globals it is possible to get a Runtime error if the Global has not been initialized before you reference it, but will NOT produce a compile time error.
Parameters and Control Block items are a little more flexible in that you can define the parameter's datatype as CHAR, DATE or NUMBER (check Forms Help for the max datatype values they can store). Parameters and Control block items also have properties which means they take up more memory resources because the properties of these items have to be loaded into memory in addition to the data.
I would recommend using Parameters over Globals for Forms specific variables because you have greater flexibility with the data types supported, however, I personally prefer to use a Forms Package Specification with Package Variables declared as this more flexible and only allocates the amount of memory needed to support the variable. When I have a situation that requires a variable be visible to the entire form, but doesn't need to be Global to the session, I will create a Package Spec called FORM_VARS in the Program Units node of the Object Navigator and declare the variables I need. I do not create a Package Body. For example:
PACKAGE FORM_VARS IS
n_User_ID NUMBER;
v_User_Name VARCHAR2(25);
END;You then reference the variables the same as you would for any Forms program unit.
BEGIN
Forms_Vars.n_User_ID := 1234546;
Forms_Vars.v_User_Name := 'John Doe';
END;Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly.
Edited by: CraigB on Jun 28, 2010 11:17 AM
Maybe you are looking for
-
I'm unable connect my I pad mini to my laptop(window 7,64 bit) after formatting,my iTunes didn't find my device,before format everything working properly but this time lot of problem plz help
-
Clearing documents with no document currency
Have a balance on a acct that is to be written off. Balance only appears on acct as when document currencies is *. When creating GL entry to clear acct we end up with a balance on the acct in whatever currency was used in the clearing document. Th
-
An anonymous app and validation help/guide
Hello, I have created a very simple anonymous app. The propose of it is to have users get an email with a link to this app. This link contains an id. I like to create a process using and using ID before page loads so if the id does not exist in my ta
-
Choose from list in the system
Hi I want to create the Choose from list in the System form (Employee Master Data) in the edit box. what is the coding for this ? can anyone help me ... Regards Bhuvana Edited by: bhuvana eshwari on Aug 7, 2008 8:23 AM
-
Unable to use Adobe Reader. "Reader has finished searching the document. No matches were found." I can use Adobe Reader on some documents but not all. I believe I have downloaded the correct software. I am using Firefox on a Mac with 10.8.4 Can a