How get/compare the current value in a business rule?
Dear all,How can I do this in the planning by using calculation Manager, I have an account named "service_years", I want to write:
IF 'Service_Years' > 5
account_xyz = 1000;
Endif;
How can the logic above to convert in the accepted syntax? because it is not applicable to such if condition directly on a member.
Thank you.
VR;
If service_years == 5
;-)
Kind regards
André
Tags: Business Intelligence
Similar Questions
-
How to compare the new values with the old values in triggers.
Dear all,
Please tell me how to compare the new values with the old values in triggers.Hi, the employee example is in the document. You'd better read yourself.
CREATE OR REPLACE TRIGGER Print_salary_changes BEFORE DELETE OR INSERT OR UPDATE ON Emp_tab FOR EACH ROW WHEN (new.Empno > 0) DECLARE sal_diff number; BEGIN sal_diff := :new.sal - :old.sal; dbms_output.put('Old salary: ' || :old.sal); dbms_output.put(' New salary: ' || :new.sal); dbms_output.put_line(' Difference ' || sal_diff); END; /
-
How to display the current value on TOP in a LOV
Hello
I'll have something to say that p1_type a LOV with the following SQL query-based.
default resultsselect emp_type d, emp_typ r from emp
suggest that the current value of P1_TYPE is CON... is there a way... while displaying on the screen, CON should be the 1st element to display in the LOV.EMP VEN CON GEN
Equally, if the current value is - EMP... display must beCON EMP VEN GEN
Thank youEMP CON VEN GEN
DeepakHello
This can be done without a statement from the UNION. See: [http://apex.oracle.com/pls/otn/f?p=33642:249]
This example uses:
SELECT X.ENAME d, X.EMPNO r FROM (SELECT CASE WHEN EMPNO = :P249_EMPNO THEN 1 ELSE 2 END SORTORDER, EMPNO, ENAME FROM EMP) X ORDER BY X.SORTORDER, X.ENAME
The element that corresponds to the selection gets a SORTORDER 1 value, all others are 2. This value is then the primary sort for the list order
Andy
-
How to make the current value by default to all controls both
Choose 'Data Operation'-> 'Do current Default value' to several controls requires a lot of clicking. Is it possible to do so with a single click?
Yes. If you select no control, he says 'Do the current default values' and it does all the controls at the same time. If you have a control is selected, then it does so only the selected controls.
Reset the current values default works in the same way. Do not select anything, he does all the controls at the same time.
Bob Schor
-
How to compare the original value of table size and the changed value
juice I took a table and then took the function of the size of the array so that it shows me the number of the elements present in it. so it'll be the original table size value. If the items in the table even changes another value, then I want to compare the original table size value and the value of table size has changed. How to compare... Please help me. you are looking for a possible solution. Thank you
Hi stara,
the attached picture shows the ony solution.
It will be useful.
Mike
-
How to compare the current password encrypted pasword enter APEX4.1
Hi all
In my application uses the following package
Here the ADD_USER procedure will convert the password and stores in the Table app_users in encrypted form.create or replace PACKAGE BODY app_security_pkg AS PROCEDURE login ( p_uname IN VARCHAR2 ,p_password IN VARCHAR2 ,p_session_id IN VARCHAR2 ,p_flow_page IN VARCHAR2 ) IS lv_goto_page NUMBER DEFAULT 1; BEGIN -- This logic is a demonstration of how to redirect -- to different pages depending on who successfully -- authenticates. In my example, it simply demonstrates -- the ADMIN user going to page 1 and all other users going -- to page 2. Add you own logic here to detrmin which page -- a user should be directed to post authentication. IF UPPER(p_uname) = 'ADMIN' THEN lv_goto_page := 1; ELSE lv_goto_page := 2; END IF; APEX_UTIL.SET_SESSION_STATE('FSP_AFTER_LOGIN_URL'); wwv_flow_custom_auth_std.login ( p_uname => p_uname, p_password => p_password, p_session_id => p_session_id, p_flow_page => p_flow_page || ':' || lv_goto_page ); EXCEPTION WHEN OTHERS THEN RAISE; END login; PROCEDURE add_user ( p_username IN VARCHAR2 ,p_password IN VARCHAR2 ) AS BEGIN INSERT INTO app_users (username, PASSWORD) VALUES (UPPER (p_username), get_hash (TRIM (p_username), p_password)); COMMIT; EXCEPTION WHEN OTHERS THEN ROLLBACK; RAISE; END add_user; -- Function to Perform a oneway hash of the users -- passwords. This cannot be reversed. This exmaple -- is a very week hash and if been used on a production -- system, you may want to use a stronger hash algorithm. -- Read the Documentation for more info on DBMS_CRYPTO as -- this is the supported package from Oracle and -- DBMS_OBFUSCATION_TOOLKIT is now depricated. FUNCTION get_hash (p_username IN VARCHAR2, p_password IN VARCHAR2) RETURN VARCHAR2 AS BEGIN RETURN DBMS_OBFUSCATION_TOOLKIT.md5 ( input_string => UPPER (p_username) || '/' || UPPER (p_password)); END get_hash; PROCEDURE valid_user2 (p_username IN VARCHAR2, p_password IN VARCHAR2) AS v_dummy VARCHAR2 (1); BEGIN SELECT '1' INTO v_dummy FROM app_users WHERE UPPER (username) = UPPER (p_username) AND PASSWORD = get_hash (p_username, p_password); EXCEPTION WHEN NO_DATA_FOUND THEN raise_application_error (-20000, 'Invalid username / password.'); END valid_user2; FUNCTION valid_user (p_username IN VARCHAR2, p_password IN VARCHAR2) RETURN BOOLEAN AS BEGIN valid_user2 (UPPER (p_username), p_password); RETURN TRUE; EXCEPTION WHEN OTHERS THEN RETURN FALSE; END valid_user; END app_security_pkg;
In my application, users can change their password,
So I need to compare the password entering the Current_password field with the password encrypted in the app_users table.
So I used the following code,
This code works fine when the password is stored without encryption, but it displays error, after encryptiondeclare l_x varchar2(30); begin select username into l_x from app_users where upper(username) = upper(:P7_USERNAME) and password = :P7_CURRENT_PASSWORD; return (true); exception when no_data_found then return (false); end;
because the password entered is simply password and not encrypted if the two are different even if the user enters the correct password.
Please tel me how encrypt the entered password to compare with the encrypted password.
Thank you
Kind regards
gurujothi.Hi guru,.
When you say comparing it is obvious that both must be in the same format, so either you have to compare both encrypted or not encrypted.
Do you have an example on apex.oracle.com?
Thank you
-
How to check the current values of COMMIT_WAIT and COMMMIT_LOGGING
Is it possible that you can check in a session to determine the current settings for COMMIT_WAIT and COMMMIT_LOGGING? I am not referring to a situation where they are defined via ALTER SYSTEM and changed the world, but changed using ALTER SESSION and locally defined. I'm currently testing a trigger to do it for a very specific batch user and just need to be able to log on and check if the adjustment was established successfully or not.>
Is it possible that you can check in a session to determine the current settings for COMMIT_WAIT and COMMMIT_LOGGING?
>
Well, since these are the initialization parameters, you can check the PARAMETER V view $select name, value from v$parameter where name like 'commit%' NAME,VALUE commit_point_strength,1 commit_write, commit_wait, commit_logging,
And after changing their
alter session set commit_logging = 'IMMEDIATE'; alter session set commit_wait = 'FORCE_WAIT' ; NAME,VALUE commit_point_strength,1 commit_write, commit_wait,FORCE_WAIT commit_logging,IMMEDIATE
-
How to compare the 3 values in table
Hi all
This is my first post so be tolerant
I need to find "bad values" in the table, it will be easier to explain with example:
I have a table like this: 0 0 0 0 0 0 0 0 5 0 0 0 0<- so="" "5"="" is="" the="" bad="" value,="" my="" method="" is="" to="" check="" two="" of="" nearby="" values="" so="" x(i-1)="0," x(i)="5" x(i+1)="0," and="" if="" checked="" value="" is="" more="" than="" 25%="" bigger="" or="" smaller="" it="" should="" be="" replaced="" by="" average="" of="">->
example: 0 1 2 3 4 9 6 7 8<- bad="" value="" is="" 9,="" and="" result="" of="" my="" filter="" should="" be="" (4+6)/2="">->
I did it using the formula node (not 20% and no way, but the point is the same) and it works but now I want to do without C and I had a lot of problems because of the size of the array memory is 10000.
I joined thah vi and signal, you can test that it works very well
Thank you
Mike
MeeHow wrote:
... What is the problem?
Because the first incorrect value is the point of 2780, because it is also disabled because the average of neighbour is biased by the incorrect value to 2781.
You could jut blindly replace all values with the value that has the lowest absolute value among the three points that we have. Here's a quick project, seems pretty good, but it really depends what you want.
-
How to subtract the current value of the next value (row) in the same column
Hello
I am struggling to write a SQL query that can do something like, as shown in the example.
Suppose I have a value with values as a column
VALUE
---------------
21138672941
21266223360
21375446692
21464626060
21546520653
21616643777
21689565041
21781762699
21882541342
21983644803
22086697638
My requirement is to write a query to subract 1st row of second, second in the third, third in the fourth and so on.
The output should be 127550419, 109223332 and so on.
Is this possible with a request? Please give me the code pl/sql query if possible.
Concerning
SmailNo problem. Should be as simple as taking my query and replace 'data' a 'test', but you can change the order of Analytics at snap_id
select value , lag(value) over (order by snap_id) prev_value , value - lag(value) over (order by value) diff from test;
Give it a try
-
How to set the current value of the sequence?
Hello
I want to force the sequence MySEQ to a precise value, so that next time, when MySEC.nextval is called, it will be 165. The increment, cache options, etc. are unchanged. So if the increase was of 1, and then subsequently, this sequence will deliver 166, 167, etc..
Thanks in advance for any help.Generally not a good idea since deleting and recreating the means you will have to re - grant privileges on the object.
-
How to get the current value of db in backing bean
Hello
I use jdeveloper 11.1.2.3.0
I would like to know how I could access the old value of an attribute in backing bean.
I know I can get it in terms of EntityImpl with the getPostedAttribute function,
but as I see that I'm not allowed to access this function in the ViewImpl.
I get this error:
Error (151,33): getPostedAttribute (int) has protected access to oracle.jbo.server.EntityImpl.
Could you help her?
What is the right way to get the current value on db in backing bean?
Thank you very much!You can add a transitional attribute to the entity object to hold the old value of the desired attribute, then you can add this attribute to the view object.
Check [url http://www.youtube.com/watch?v=iKVIiK0FBXI] retrieve the previous value of an attribute ADF BC -
How to get the current value of the checkbox button programmatically in the adf
Hello
I want to get the current value of the checkbox (checked/unchecked or 0/1) in my bean java whenever I press the button "submit" on my page jspx.
My version of JDeveloper is: 11.1.1.6.0Where the value checkbox link? The State of the check box is held in the value property of the check box. This is normally an EL as
#{bindings.Myvar1.inputvalue}
or something pointing to a bean property. This value can be read from the listener to the action of the submit button
BindingContainer bindingContainer = BindingContext.getCurrent().getCurrentBindingsEntry(); AttributeBinding attr = (AttributeBinding)bindingContainer.getControlBinding("Myvar1"); Object obj = attr.getInputValue();
Timo
-
Get the current value of a control of the ring
I have a control of the ring that has the following values. See attacment. I need to get the current value of this one and use it as input for another function, but First I would like to get the current value and save ina text file. I tried this
if (event == EVENT_LEFT_CLICK_UP) || (event == EVENT_LEFT_CLICK_DOWN) { int p; GetCtrlVal (panelHandle, PANEL_RINGSLIDE_1, &p); FILE *OutFile = fopen("C:\\Users\\Student\\Desktop\\ringtest.txt","w"); fprintf(OutFile,p); fclose(OutFile); }
I need to get the current value of the ring (& p) to write to the file ringtest.txt.
Also, I need to use this value (& p) as another entry in the same program.
IE value of & p must be used in
b = c * 5; where c is the value of the current & p.
Can any 1 help?
You're right: EVENT_LEFT_CLICK_DOWN is not a valid event for the CVI. Valid events are listed in the userint.h file, and are the only events that can be caught in the trap in a point of order. On the other hand, you're assuption on EVENT_VAL_CHANGED is correct: you can trap forget the EVENT_CLICK_UP event.
According to the second question, looking at the definition for fprintf you must pass a string format as the second parameter to the function, then the value to write to the file. In your case, the correct syntax is:
fprintf (OutFile, "%d", p);
-
How get/set the value of the DataObject object in the task of the API?
How get/set the value of the DataObject object in the task of the API?
Are there examples of code availible?
Hello
You are here: http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_worklistcust.htm
Antonis
-
JUCtrlListBinding - get the current value of the list
Hello.
(Win7 Jdev 11,1,2.)
I saw a personal code in the book 'Oracle Fusion Developer Guide' to get the current value of the listItem as below:
Import oracle.adf.model.BindingContext;
Import oracle.binding.BindingContainer;
Import oracle.jbo.uicli.binding.JUControlBinding;
Import oracle.jbo.domain.Number;
Import oracle.jbo.server.ViewRowImpl;
BindingContext bindingCtx = BindingContext.getCurrent ();
BindingContainer links = bindingCtx.getCurrentBindingsEntry ();
JUControlBinding listBinding = null;
listBinding = (JUControlBinding) bindings.get ("JobId");
ViewRowImpl selectedListRow = null;
selectedListRow (ViewRowImpl) = * listBinding.getSelectedValue () *; :(
String jobIdValue = (String) selectedListRow.getAttribute ("JobId");
Number of maxSalary = (Number) selectedListRow.getAttribute ("MaxSalary");
but Jdeveloper cannot find the method getSelectedValue() to listBinding.
Help me please to understand the correct method. !
Thank youDeclare the type of the variable listBinding as JUCtrlListBinding instead of JUControlBinding. The base class JUControlBinding does not contain a getSelectedValue() method, this method is defined in the subclass JUCtrlListBinding.
Dimitar
Maybe you are looking for
-
I can't install Itunes on Windows XP.
Message says: a device is necessary to install on your PC. c/programs/itunes file location
-
photos of windows mail messaging
Cannot send pictures I have an email cannot remove. seems to prevent the sending of pictures. I regularly send emails thanks david
-
BlackBerry Smartphones BB Pearl Windows Live Messenger problems
I have Windows Live Messenger icon, but when I click on download it gives me an error: Device software downloads Sorry, your session has expired. Please close all browser windows and then return to the home page to start over. Any ideas? Thank you J
-
Well seen enthusiastically finally bought and installed LR, the first hours were terrible. Photoshop plugins does not, printing without margins not working not but my first main problem is to import. I tried to import a folder with subfolders and a 2
-
new external hard drive not seen by LR
Just bought a 5 TB external hard drive. The drive appears on my desktop imac computer, but dose not in LR. How it appears in LR?