Enable or Disable LOV based on the organization_id
Hi,
I am working on apps forms, in this i have requiremnet - i need to add an Lov to a field.
Suppose we are having 3 organizations like 'org1', 'org2' and 'org3'.
When 'org1' users open the form, i need to enable the LOV for the feild.
When 'org2' users open this form, i need to disable the LOV for the feild(means, the field needs to display without LOV).
I written LOV query as
SELECT description
FROM mtl_txn_request_headers
WHERE organization_id=:parameter.org_id
GROUP BY description.
Please help me on this requirement and also let me know where i need to write the code.
Show_lov is a function which returns true or false, depending on how the user finished the lov. So it would be:
IF :parameter.ORG_ID IN (265,266) THEN
IF SHOW_LOV('DESCRIPTION') THEN
NULL;
END IF;
ELSE
NULL;
END IF;Anothe solution for your problem would be to disable the Lov at the item using:
SET_ITEM_PROPERTY('BLOCK.TEXTITEM', LOV_NAME, '');
Similar Messages
-
"Filter the LOV based on the selected conditions" RADIO BUTTON doesn' work
Hi All, I'm trying to create a cascading parameters mechanism, but I found certain difficulties.
I need to have 2 LOV connect: the master LOV retrieve a list of User's groups, and the detail LOV has to retrieve only the customer's categories that come from the user's groups selected.
So, in order to retrieve the values I defined on the Administrator:
1) one custom folder for the master LOV (list of the User's groups) and another custom folder for the details LOV (list of the customer's categories).
2) The 2 LOV as item classes
On Discoverer Plus, following the manual ("About filtering lists of parameter values based on selected conditions ("cascading parameters"), I tried to create thw first parameter based on the master LOV, but I DON'T have the radio button "Filter the list of values based on the selected conditions" enabled !!!...I CAN'T USE IT !
If this radio button is not enabled, I can't link the master parameter with the detail parameter.....
Anybody can help to discoverer what I missed during the creation of cascading parameters ?
Thanks in advance for your help
AlexHi Manav, thanks for your reply !
I resolved the problem, linked the two custom folders with a join !
The radio button didn't work just only the parameter where condition has to be deselected and then re-selected !!
Alex -
How can I re-enable a disabled Ipad from my computer?
By not allowing enough time to reset, do you mean you have tried a reboot by holding both the power and home buttons until the apple logo appears, ignoring the red slider? If so, are you able to power down just using the power button? Does it then restart on its own?
If you cannot get it to reboot, stay powered down, take it to an Apple store genius bar and have the technicians test it to see what is wrong...that is most likely a hardware issue. -
Populating a report column(Popup lov) based on the other column.
I have a report where a column that is a Popup Lov(Query based LOV) needs to be populate based on another column in the same report.
For example, if the column1 has query based lov select statment "select a,b,c from tab where d= *<<col2>>* ".
I would like to have a sql query based on the values of second report column. Any ideas are appreciated.
Regards,
madhuYou can do that only if you use apex_item. See this example as a reference:
http://apex.oracle.com/pls/otn/f?p=31517:176
In this example the second select list query depends on the first select list column value.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
How to bind value to lov based on the output from other lov
HI all, i have 2 message choice Lov, i am selected a value from the 1st lov based on this value i am a executing a query, i want to display one of the attribute value from the query result in the second LOV. i am getting the attribute value correctly but i dont know how to bind that(display) in the 2nd LOV(at runtime).
Read the dev guide LOV section, it should give you details about this implementation.
-
Dynamically changing the select list in an LOV based on the login user
We have a field in a form which is a combobox.The form is to be linked to different profiles of users.Based on the logged in user we would like to restrict the select list in the LOV.ie user1 should see a LOV which is different from that seen by user2.Is this possible.If so how can this be done?Kindly reply.
Thanks & Regds,
JayanthiThanks for ur reply.But my problem is that i have a table having details of some products which includes spareparts also(Name,id,price etc).In my form i have the combobox field which should have a list of these products which the user can select.Now depending on the user's profile he should see only his related products(One profile of users should view only the products but not the spares while the other should view only spares.)The details of both the products and spares are in the same table.we have a criteria to differentiate between the products and the spares.The LOV should display at run time, either products or spares depending on his profile as he logs in. Hope u understood my problem.
Regds,
Jayanthi
Hello Jayanthi,
I had a similar situation in my last project.
While you can solve this by modifying your query, this will always come around as may be later some other criteria to restrict based on User/His Role/Something else. Hence I fixed it at design level itself. Though I can't give my situation I can tell you the solution applying my logic.
Altering your Product Table and adding one more database Column say Product_Category and updating the table with Product Category =1 for Products and 2 for Spares. You can extend this further for other types.
Create a new Table say User_Groups that will have
Group_id
Group_Name
User_Id columns and will contain all the User ids inserted groupwise.
Create one last Table Group_Product_Map
That will have
Group_id
Category_id
This will store each Group_Id followed by Category_id of Products to which these group members will have access to.
Now write a database function getCategory( p_User) which will query User_Groups table to get Group_Id
and further query Group_Product_Map Table based on group_id to get Category_Id.
This function will return category_id.
Huh!
So your LOV will have a query as select *(or whatever) from Product where category_id = getCategory(portal30.wwctx_api.get_user)
Hope this helps
Madhav -
How to disable field based on the selected value
Hi everyone,
I have "employee" table,
it contains the following field,
emp_name
emp_designation
Category
YearsHere the "category" is the select list value which has the following values in select list,
Fresher
Experienced,
when the value :Fresher" is selected for "category" then the "Years" field should be disabled.
I tried the following dynamic action ,
Name:Disable_year
sequence:20
Event:Change
Selection Type:Item
Item(s):Category
Condition:equal to
value:Fresher
Fire When Event Result Is:TRUE
selection type:P1_YEARBut it doesnt work.
can anyone give alternate solution?
Thank you.
Regards,
gurujothiName:Disable_year
sequence:20
Event:Change
Selection Type:Item
Item(s):Category
Condition:equal to
value:FresherTry return value instead of this display value(Fresher) of select list
Fire When Event Result Is:TRUE
selection type:P1_YEARIn your above dynamic action, where is the disable action? -
How to granularly enable Multi-Factor Auth based on the system and not the user?
Hi,
we are using Azure AD to federate some cloud services. We want to deploy Azure MFA to some of them, but not all. In particular, we don't want MFA for o365.
How can I force MFA depending of the service ?
Regards,
JohnHi,
I think you may ask in:
https://social.msdn.microsoft.com/Forums/en-US/home?forum=windowsazureactiveauthentication&filter=alltypes&sort=lastpostdesc
Regards.
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
Need help with OA Framework. Enable/Disable LOV dynamically
Hello,
I am new to OA Framework. My requirement is as follows;
The page should have a field with parameter org code (LOV). When the user selects an org and click GO button, the page should display all the inactive items (which have no Sales order or work order for last 2 years). In the table region, user selects single record or multiple records by a check box. The selected records should be processed after clicking a submit button in the table region. The process is, calling an API to change the status of the item to Inactive or some other status. The status should be determined by the user by selecting a LOV within the table region. I could create LOV based field for org code and could display the data on the page. I have been trying to display the LOV for item status , I have created a LOV under table region under table components > table actions. I could open the LOV and select a value, but the value is not defaulting to the field on the page. Somebody please help me with a suggestion or if you have the code for a similar kind of requirement please share with me.
Also, need some suggestion on how to enable and disable LOV dynamically. I want to display the 2 LOV's in different regions. I want to enable the LOV for Item Status only after the org code is selected and the page populated after the user clicks GO button.
Thanks in Advance…..Hi,
I could open the LOV and select a value, but the value is not defaulting to the field on the page.pls check the LOV mapping ,this might be wrong.
to enable/Disable LOV dynamically ,u need to use PPR,please check the lab solution exercise create employee chapter to learn to implement PPR functionality.
Thanks
Pratap -
Two LOVs in same UIX page based on the same table
Hi group,
Recently I ran into a problem with a UIX page that has two LOVs based on the same database table. In Emp and Job terminology, here's what I tried to do.
Suppose we have use the Employees and Jobs tables from the HR scheme with one small modification. Add a column called PREFERRED_JOB_ID of type VARCHAR2(10) which is exactly the same as JOB_ID. Hypothetically speaking, this column will be used to allow Employees to select their preferred job in case they want to change their jobs.
Next, create business components in JDeveloper based on the Employees and Jobs table. In order to be able to generate the LOVs for Job and PreferredJob create two ViewObjects, one called JobsLookupView and one called PreferredJobsLookupView. These both need to be based upon the same Jobs EntityObject. Also include the Jobs EntityObject twice in the EmployeesView ViewObject and give one the alias PreferredJobs. Include the JobTitle attributes of Jobs and PreferredJobs in EmployeesView so they can contain the JobTitles selected in our future LOVs.
Next create a ViewController project if it's not already there and enable JHeadstart on it. Create an Application Structure File and create the lookups for the two LOVs. When I run the application I see this happening:
When I click the flashlight icon next to the PreferredJob LOV and select a job, the PreferredJob field is selected in the UIX page but no job title appears. When I next first select the Job LOV and select a new job and then select the PreferredJob LOV again and select a different job, the job that was selected in the Job LOV is now also entered in the PreferredJob field. When I make sure the PreferredJob field isn't required (remove the required="yes" property on the messageLovInput entry for PreferredJobTitle and remove the PreferredJobTitle field from the addRequiredRowItems list in the UIX page) I can save the changes I made in the Employees.uix page. The same JobId is stored in the database for Job and PreferredJob.
This behaviour is probably due to cacheing issues because both LOVs and the EmployeesView ViewObject use one EntityObject for four values in three ViewObjects.
So I then modified my model a bit. I created a new EntityObject called PreferredJobs based on the JOBS table. I modified the EmployeesView ViewObject to use this EntityObject for the PreferredJobTitle attribute and modified the PreferredJobsLookupView to use this EntityObject.
I needed to modify a few things as well in the Application Structure File (which were prompts and whether or not the attribute should be visible in a table) and after regenerating I made sure the PreferredJob attribute isn't required in the UIX page. When I then run the application again, I never see the JobTitle I select in any LOV allthough the PreferredJob field is selected when I select a Job in the PreferredJob LOV. The correct JobId now is stored in the database though.
Has anyone ever encoutered this behaviour? Would anyone know how to get two LOVs based on the same table in one UIX page?
Thanks in advance,
Wouter van Reeven
AMISOK I figured it out. When I added the second Lookup ViewObject (PreferredJobs) no additional Association was created. Therefore, ADF BC wasn't able to figure out which field to update. When I added the Association between the PreferredJobs Lookup ViewObject and the Employees ViewObject everything started working ok.
I then recreated my inital situation: one EntityObject for Jobs and one for Employees, now with two Associations between them. After modifying the Employees ViewObject and making sure the Jobs EntityObject was referred twice and via the corresponding Association, everything started working ok.
Greets, Wouter
AMIS -
How can i re-enable/restore a disabled iPad and keep the data without using a laptop or iCloud
Hello,
Is there a way to re-enable a disabled iPad and maintain the data taking into consideration that no iCloud backup was made and the computer it was last synced with was not available? any idea?No, sorry. Without a backup in iCloud or iTunes, you will have to set it up as if new and anything on it will be lost now.
You can always re-download purchased apps and content (other than audiobooks) once it is restored, from the respective iTunes or App stores. -
Dynamic LOV based on Current user
How do i make a dynamic LOV based on the user id of the current user.
Also how to insert values from a form into a database
Can anyone please help me out.
ThanksUse portal.wwctx_api.get_user to get the currently logged in userid.
The simplest example of a form manipulating data is to create the form based on a table. All DML works automagically. You can base your form on a procedure with dummy columns and do your own DML if you wish. Lots more flexibility that way... -
List of values (LOV) based on PL/SQL
Is it possible to create a LOV based on PL/SQL ?
I want to do this because I have at least 5 LOV based on the same query (when you are using bind variables).
This is the normal query (ex.: LOV_FREQ_CODES) :
SELECT c.code ||' - '|| c.description AS display,
c.code AS return
FROM codes c,
code_types ct
WHERE c.code_type = ct.id
AND ct.code_type_description = 'Frequency' (should be a Bind Variable)
ThxLook into "Pipelined Table Functions" (http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/x/Table_Functions_Cursor_Expressions/Pipelined_Table_Functions.htm)
Basically you have your codes tables and a function (get_code). The function is passed a parameter (bind variable). The function then fires a query using the parameter value to render rows which are "pipelined" are a return value of the function. So you LOV query would look like:
SELECT c.code ||' - '|| c.description AS display,
c.code AS return
FROM codes c, TABLE(get_code('Frequency')) ct
WHERE c.code_type = ct.idMike -
SQL to get a LOV based on a value range (zips based on zipcode range)
I have a requirement to capture state,county,city and zipcode values based on AR Tax tables. I created an DFF with Input field for State, County and City and corresponding LOVs based on the tax tables. I am not sure how to proceed with zipcode (I am not a FORMS expert, that further makes it complicated :) )
For those who are aware of the tax tables - AR_LOCATION_VALUES and AR_LOCATION_RATES, there are no list of zipcode values. zipcodes are maintained at the city record level as a range FROM_ZIP_CODE and TO_ZIP_CODE. So a CITY record for GA.FULTON.ATLANTA has a from_zip of 30301 and to_zip of 30321-9999. I am not worried of the ( +4 ) values, all I care is the 5 digit zip and zip will increment by 1. For this scenario I want to show each zip code as a value in my LOV..so I want to show 30301, 30302, 30303....30320, 30321. Is there a SQL to generate such LOV based on range?
Any SQL experts out there with ideas?
Thx, SureshWilliam Robertson wrote:
Nice, but I think he wants the zip range as 30301 - 30321, discarding the '-9999' (apparently known over there as the '+4' component of the zipcode).Thanks William, i missed out on that detail (though it makes a heck of a lot more sense than generating a LOV with 60,000+ elements :) )
TUBBY_TUBBZ?
with
parsed_data as
select
lower_bound,
substr(range_string, 1, instr(range_string, '-') - 1) as high_bound
from
select
30301 as lower_bound,
'30321-99999' as range_string
from dual
select
lower_bound + level - 1
from
parsed_data
connect by level <= high_bound - lower_bound + 1;
LOWER_BOUND+LEVEL-1
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
21 rows selected.
Elapsed: 00:00:00.01Would be the proper approach based on having a lower bound and having to parse the upper bound from a range string.
William Robertson wrote:
Now if I had a clue how to use MODEL...You're not alone in that boat :) -
Second LOV based on First LOV in Oracle APEX tabular Form
Hi,
I had created a tabular form in which I am having two LOV's. This form is based on a query.
I had created a javascript function which internally calls AJAX and populates the second LOV based on the value selected in first LOV when onchange.
But the issue is, when the user recalls this APEX page to view the details or edit the details, the second LOV shows all the values instead of showing only the values related to first LOV.
In the second LOV query I am trying to write the below query.
select function_name fn
,function_code_id fci
from catering_function_codes
where function_type_id = NVL(#FUNCTION_TYPE_ID#,function_type_id)
order by to_number(function_code_id)
in which #FUNCTION_TYPE_ID# is the value of first LOV. But I am getting the below error.
report error:
ORA-20001: Error fetching column value: ORA-06550: line 1, column 187:
PL/SQL: ORA-00911: invalid character
ORA-06550: line 1, column 7:
PL/SQL: SQL Statement ignored
How can you refer to the Second LOV the value of First LOV in a report based tabular form?
Kindly let me know if you do not understand the issue.
Please help me in this issue.
Thank you
Regards
DevHi Roel,
Thank you for the quick reply.
I used the query as given by you. This time it is not giving any error but showing all the values in the second LOV irrespective of what ever value is present in the first LOV
This is an apex tabular form which is generated by apex based on a query. The controls will be dynamically generated by APEX for each row. How can we hard code the control name to :P99_FUNCTION_TYPE_ID?
Please help me in this issue. Thank you
Regards
Dev
Maybe you are looking for
-
Drag and Drop issue and Exposé
I know that there are many people with the same problem and maybe creating a new topic might seem lazy but I've just found a way to replicate the problem in my system and that might enlighten somebody to find a way to fix it. I've noticed that finder
-
Dang it! Safari keeps quitting on me.
My daughter loaned me her iMac G3 400 mghz with Mac OS X (10.2.8) until I can get my G4 Flat Panel fixed. But, Every time I type in a search field or in any other kind of field on Safari, Safari quits. Actually I never get past the first character. I
-
Oracle Beehive Framework Configuration error in windows 2003
[INFO ] [2011-01-14 20:57:48] [GlobalLib::Executor::executeCmdlineTool Line 518 ] [Executing "h:\oracle\product\2.0.1.2.0\beehive_1\beehive\bin\beectl.exe access_control_utils --seed_system_assigned_role 3F2F:780C:enpr:1DE527E545404618A2A075CCFEB
-
[SOLVED] pacman signature problem (haskell repo)
Hi, Tried to enable unofficial haskell repo (this is a config which runs on another box): [haskell] # Arch-Haskell repository # Discussion: http://www.haskell.org/mailman/listinfo/arch-haskell Server = http://xsounds.org/~haskell/$arch # Server = htt
-
Looking for some advice on a Golden Triangle Storage setup.
Good Afternoon, I'm an IT technician at a school where we currently have a 600 computers and are now getting many requests to integrate our Macs also into our system. I've used Macs for a while and have tried and researched to get this query sorted b