Second list depending on first on when-list-changed
Hello!
I'm having some trouble with 2 poplists. First poplist (:bloc_portar.lista) is generated ok. Second poplist (:bloc_portar.cnp) depends on the values of the first like this:
DECLARE
nume_lista1 varchar2(60) := replace(:bloc_portar.lista, ' ', NULL);
nume_lista2 varchar2(60);
rg_query_cnp varchar2(1000) := 'SELECT b.id, b.id FROM vizitatori2 b
WHERE b.nume=nume_lista2';
rg_id_cnp recordgroup;
rg_id2 recordgroup;
err_cnp NUMBER:= 0;
BEGIN
nume_lista2 := substr(nume_lista1, 1, 7);
message('---' || nume_lista2 || '---');
rg_id2 := Find_Group ('rg2');
if not ID_NULL(rg_id2) then
delete_group(rg_id2);
end if;
rg_id_cnp := create_group_from_query('rg2',rg_query_cnp);
err_cnp := populate_group(rg_id_cnp);
clear_list('bloc_portar.cnp');
populate_list('bloc_portar.cnp',rg_id_cnp);
END;
nume_lista1 fetches the data selected from the first poplist and nume_lista2 takes the first 7 letters of that string to pass it in the query which should make the group/populate the second list. This code is more of a test and not a final code thats why i used those string functions (and also because the values in first list are concatenated (name+surname).
I used a message to make sure the value in nume_lista2 is the one that i want for the query to work.
The problem : its in here 'SELECT b.id, b.id FROM vizitatori2 b WHERE b.nume=nume_lista2';
I've found out that when i pass the WHERE condition "manually" like this 'SELECT b.id, b.id FROM vizitatori2 b WHERE b.nume=''James'' ';
the second poplist is populated just fine with the right values. But when i try to make it use the variable nume_lista2 in the condition it says that rg2 (aka the group for the second poplist) "Cannot create Group rg2".
Hope you can help me,
Iulian
But can u enlighten me on a couple of issues pls?Sure :)
>
1. How come it doesn't recognise the variable in the query when i make the definition in DECLARE? Shouldn't it be analyzed only later in the main program when i actually use the query ? How does this work?You can do that in declare part too :). I am usually convenient to have a query built just before using it.
2. Why tripple quotes and concatenate operators ? Is this how variables are passed to queries? I believe i used them before without any extra bording or anything.varchar2 variables are not passed with quotes by default. So, if you do not use the quotes, the resultant query would be something like
SELECT b.id, b.id FROM vizitatori2 b WHERE b.nume=Jameswhich is not what we expect. So, surround the variable with the quote, which would turn the query to
SELECT b.id, b.id FROM vizitatori2 b WHERE b.nume='James'HTH.
-Arun
Similar Messages
-
After accepting an update this morning from Mozilla, I now get a second icon on my bottom toolbar when I change from either news to gmail or from gmail to news. I tried restarting my computer but it still does it.
Thankyou mccashin:
I checked the home page assignment in preferences and found that the errant site had been appended to the normal (google) home page address. Incidentally, I had basically solve the problem within a session by erasing all history related to bbc. Without your fix I would been back to the same error next time I started Firefox from scratch. Thanks again. -
Code to make second job dependent at first
Hello experts, how can I write an ABAP code to kick of an event after the first step, and make the second job dependent on the event. thanks a lot...
Hi christopher,
1. Simple
use like below when writing code FOR SECOND JOB
where ;
jobname = 1st jobname
jobcount =1st job count
2.
Data Declaration
DATA : eventparm LIKE tbtcjob-eventparm.
eventparm = jobname.
eventparm+32 = jobcount.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = jobcount_sen
jobname = jobname_sen
predjob_checkstat = ''
event_id = 'SAP_END_OF_JOB'
event_param = eventparm
regards,
amit . -
Create list item in parent site when list item is created in child site?
SharePoint online - Can I create a list item in a parent site when a new list item is created in child site? Possible with workflows?
Hi Shafaqat,
From your description, my understanding is that you want to create a list item in the parent site when a new item is created in the subsite via workflow.
Per my knowledge, there is no OOTB workflow action to achieve your requirement. I suggest you develop your own workflow activity to do it, or you can try to find a third party workflow solution to do it.
Here is an article about how to create a custom workflow activity, you can take a look at:
http://www.sharepoint-reference.com/Blog/Lists/Posts/Post.aspx?ID=37
Best Regards,
Wendy
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Music List is not ordered alphabetical when I changed the language
I changed the language from Turkish to English and I have seen that the list of the songs is not ordered alphabetical.
A song whose first letter is J and it is in the K list.
A song whose first letter is Q and it is in the R list.
How I can solve this problem.I restarted my iphone and re sync and it doesnt work. I tried reset all setting doesnt work. I will try remove all folders apps and songs. Maybe solved. if this doesnt work I'll wait 4.2 .
Message was edited by: erenyatkin -
Automatically populate custom list column with site name when list is created
Hi All,
I am using a CQWP to display selected contacts on subsites from one master contact list on the parent site. Each subsite is for a different project and is named according to the project number. In the master contact list I have a custom column called Projects
that is populated with the various different project numbers that an individual contact is involved with.
The CQWP on the subsite filters the results based on the Projects column of the master contact list. As it stands I have to manually input this job number into the CQWP's properties. What I would like to happen is for the project number (the subsite name)
to automatically be input to the filter value.
The closet I have come to reaching my desired behaviour is by adding a column to the Site Pages list called Title and setting the filter value to [PageFieldValue:Title]. This still doesn't get the automatic behaviour I require because I still have to input
the project number into the Title column manually, but it is quicker than editing the CQWP properties.
What I need to achieve is either a way of automatically populating this column with the subsite name or find a way for the CQWP to pick up the subsite name and filter its results accordingly.
I have found this article http://www.andrewconnell.com/blog/Subclassing-the-Content-Query-Web-Part-Adding-Dynamic-Filtering which seems to be along the lines of what I want to achieve, but it is by no means a walk through and while I'm not completely
unfamiliar with coding, I don't know enough to implement it without help.
Any help would be greatly appreciated, I've been working on this for weeks on and off!
Thanks in advance,
DanHi,
I believe the "Description" field type is Multiple Lines of Text. Sorting doesn't allow in this field type. In order to do the sorting, you would require to create additional column like single line of text column (note that it supports only 255
chars and require to truncate the data if more than 255) and update the data using event receiver or workflow. and do the sorting with that column.
kmhsad -
Why doesn't a List update it's display when you change the dataprovider Array?
Hi. I have a list and an array with more strings inside. If i
remove some of the strings from the array and add some new strings
then the list display doesn't update. How can i force the list to
update?
List1.dataProvider = Array1;
Array1.pop();
Array1.push("test");
List Update??????Hi MaxMuld,
Because it has to be ArrayCollection, not the Array.
Documentation about Datagrid.dataProvider says that Array as
provider will be converted to ArrayCollection. And ArrayCollection
performs all the notifications if you add/delete items in it.
If you still want to use Array you should do the following:
var ar= new Array();
ar.push(x)
grid.dataProvider = ar;
grid.dataProvider = new Array();
ar.pop();
grid.dataProvider = ar;
But this is very inefficient.
Dmitri. -
I bought a few CD's from the iTunes store, Incubus Morning View and Make Yourself. Half of the songs on there play for the full length and the other half only play for about 30 seconds when listed as the full song. Is there anyway to fix this or re-download the songs?
Assuming you are in a region where you are allowed to redownload your past music purchases, delete the broken tracks from your iTunes library, go to the iTunes Store home page, click the Purchased link from the Quick Links section in the right-hand column, then select Music and Not on this computer. You should find download links for your tracks there.
If you don't see them straight away it may help to close and restart iTunes.
While downloading select Downloads in the left-hand column and make sure Allow Simultaneous Downloads is unticked.
If the problem persists, or that facility is not yet available in your region, contact the iTunes Store support staff through the report a problem links in your account history, or via Contact Support. Do this also if the iTunes LP package itself won't work properly.
See also: HT2519 - Downloading past purchases from the App Store, iBookstore, and iTunes Store
tt2 -
Hunt group in CUCDM is ringing first extension in list when set to broadcast?
I'm working with CUCDM 8.1.3+er1.
We have a Hunt Group setup that rings 4 extensions through broadcast. Each of these 4 users have each others line appearances on their phones too.
Hunt Group example:
0 - User1
1 - User2
2 - User3
3 - User4
Problem is, when the hunt group is called the call will show up under User1 (or whoever is first on the list) and not actually everyone's line. I can change the order and the hunt group call will then ring only their line instead of broadcasting it out to the 4 users at the same time.
Is this a bug or a limitation on the platform? Where we cannot have users with line appearances of other users in the same hunt group...Hi
This configuration sounds odd - why do you need a broadcast hunt group when a call to any extension will ring all the phones anyway due to the shared lines?
Aaron -
When I select an album to play the first song gets listed many many times on upnext and is the only one to play..help
Figured it out.. Had the repeat set to 1...so it lists the first song multiple times....
-
Let's say I have a Task named "Build SSIS for Duke Energy" and it has another column called Active. Now every day I look at my task list and If I worked on that task I want to create a Journal entry of what I have done. So from the Task
list I'd like a third column that calls the "Journal Entry" list's new form page and pass it in the ID of the task. I have found several TextToHtml scripts out there, but they have to be stored in a script library, and then sourced to a content
editor web part. The problem is they don't fire when I have my list grouped. In addition to, every time someone creates a new view, I have to go in and add the Content Editor web part, point to the script....
Any thoughts. It is the grouped view that really bug me.Hi,
If you only want to add a hyperlink to create a Journal entry in the task list, I recommend to add a Hyperlink column in the task list and then create workflow to update the column.
You can follow the steps as below:
Open the task list, add a hyperlink column named Create Journal Entry.
Create a workflow associated to the task list, start the workflow automatically when an item is created.
Add actions as below:
Then when a task is created in the task list, the workflow will be stared automatically to update the “Create Journal Entry” column.
Thanks,
Jason
Forum Support
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 Subscriber Support, contact
[email protected]
Jason Guo
TechNet Community Support -
WHEN-LIST-CHANGED Triggers Works Only Once ??
hi
i have a form with the 2 list ITEMS
And i have some trigger WHEN-LIST-CHANGED For the
first LIST item which Populates the Second List
Based on the Value selected in First List
Its Works Fine For the First time.
But for second time Onward , it Does change the Value of the items in List2.
Do i have to first clear and then repopulate, i tried this but then i get a total
Blank , please help.
jaiFrom one of our support notes:
List Items populated from Record Groups are extremely useful when you need to
give your users a choice of items to choose from. This note will show you how
to create two list items that have a "master-detail" relationship, i.e., the
items appearing in the "detail" list item will depend on what is chosen in the
"master" list item.
CREATING THE LIST ITEMS
Create two list items called DEPT_LIST and ENAME_LIST. Allow them to remain
the default type of List Item, Poplists. For this situation we will not make
them base table items. Go to the property pallet of each list item, click on
the elements in list property and choose more. The cursor should be in the
very topmost item under List_Elements. Depress CTRL+SHIFT+< to remove this
default element and depress the OK button. Since you are going to populate the
list item with RG values at runtime you do not need this element. This will
avoid an "FRM-30351: No list elements defined for list item" error when
running the form.
CREATING THE RECORD GROUPS
For this example, we will use the dept and emp tables. We have a choice of
creating the Record Groups (RG) dynamically at runtime or at design
time. In this case, the easiest option is to create them at design time.
First create a RG called DEPT_GROUP with the following select statement:
SELECT TO_CHAR(DEPTNO) A,TO_CHAR(DEPTNO) B
FROM DEPT
If you are unfamiliar with the structure of the RG required when it will be
used to populate a list item please note the following:
1. A list item has both a label and a value. For this reason the select
statement brings back two fields, one which will be the label name and the other
the label value.
2. TO_CHAR is used to convert numeric values to character as the list item
contains character values.
Second, create a RG called ENAME_GROUP with the following select statement:
SELECT ENAME A, ENAME B FROM EMP ORDER BY ENAME
Note that depending upon your applications logic you may want to use the
distinct operator to prevent duplicate names. But you should be aware that
this will result in the overhead for sorting. Also, since ENAME is a VARCHAR2
data type, the to_char function is not needed.
POPULATING THE GROUPS AND LIST ITEMS
You can populate the RGs and list items from a number of triggers but the most
common is the WHEN-NEW-FORM-INSTANCE trigger. Place the following code in this
trigger:
DECLARE
V_DEPT_GROUP NUMBER;
V_ENAME_GROUP NUMBER;
BEGIN
V_DEPT_GROUP:=POPULATE_GROUP('DEPT_GROUP');
V_ENAME_GROUP:=POPULATE_GROUP('ENAME_GROUP');
POPULATE_LIST('DEPT_LIST','DEPT_GROUP');
POPULATE_LIST('ENAME_LIST','ENAME_GROUP');
END;
Note that this code is needed to initially populate both RGs and both List
Items.
If you run the form at this time you will see that DEPT_LIST contains all the
departments in Dept and ENAME_LIST contains ALL the enames in the emp table.
As our original goal was to populate ENAME_LIST depending upon what was chosen
from DEPT_LIST, we will now add the code to do this. In this situation we will
add the code to a WHEN-LIST-CHANGED trigger on DEPT_LIST. The code should
look as follows:
DECLARE
V_NUMBER NUMBER;
V_QUERY VARCHAR2(512);
BEGIN
V_QUERY:='SELECT ENAME A, ENAME B FROM EMP
WHERE DEPTNO = '||:DEPT_LIST||' ORDER BY ENAME';
V_NUMBER:=POPULATE_GROUP_WITH_QUERY('ENAME_GROUP',V_QUERY);
POPULATE_LIST('ENAME_LIST','ENAME_GROUP');
END;
First we will build a query that will contain the currently chosen department
in DEPT_LIST. This is basically the same query we created in RG ENAME_GROUP
but we are adding the where clause restriction. We then use the
populate_group_with_query built-in to repopulate the RG and then populate the
list again.
Run the form again and test. Choose department 10 from the DEPT_LIST list item
and then choose the ENAME_LIST item. You will note that the enames appearing
in ENAME_LIST will be those in department 10. This should work for any
department you choose. -
Filter second selectOneChoice depending on choice in first selectOneChoice
I have JSP page Report_start.jsp. On this page found 3 selectOneChoice. 1 - Country, 2 - Archive, 3 - Fund.
First falling out list (country) is filled by class FillCountryComboBox, located in file FillCountryComboBox.java.
Second falling out list (archive) is filled by class FillArchiveComboBox, located in file FillArchiveComboBox.java.
Third falling out list (fund) is filled by class FillFundComboBox, located in file FillFundComboBox.java.
Data are found in views qCountry, qArchive, qFund. On event OnChange first selectOneChoice is fixed action "history.go(0)", since filling occurs at renovation of the page Report_start.jsp. Then me and it is necessary to hear, is chose some importance in list. When filling second falling out list it is necessary to take into account choice first, but when filling third falling out list it is necessary to take into account choice second.
The Question - as in class FillArchiveComboBox to hear what importance is chose in list selecOneChoice1 (country)?
I using JDeleloper 10.1.3, ADF BC, ADF FacesHi,
this example from Steve Muench has different background, but maybe will help you.
(Cascading Lists in JSF [10.1.3]) http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#62 -
Dynamic select list dependency
Hello,
I want to have two select lists populated dynamically by a query, where contents of one list depend on the choice made in the other list.
For example I have tables CATEGORY (ID, NAME) and SUBCATEGORY (ID, NAME, CAT_ID). I created one List of Values that Category select list is based on: "select name d, id r from category order by 1". This alone works fine.
Now for Subcategory select list I created another List of Values: "select name d, id r from subcategory where cat_id = :CAT_ID order by 1". The where clause is just my guess and it doesn't work (select list is empty). How do I pass the value selected in my first select list as a parameter for the second one?
Nikolaican you take a look to my response to the second question at...
Pop List and Developer Toolbar
...and let us know if you have any questions?
thanks,
raj -
Including "The" in artist names when listing in I-Tunes
Is there a way to prevent I-Tunes from dropping the "The" from artists names when listing them in I-Tunes and on my I-Pod?
For example, when I scroll through artists, I don't want "The Beatles" to be listed between artists "Bass 305" and "Billy Idol", but rather within the "T's".
The problem is that I-Tunes also exports the songlists with "The..." in the artist name, which means my printed list is in different artist order, so I can't make a one to one match up. So an alternate solution would be to set I-Tunes to drop the "The" on artist names when exporting to a list.
Thanks!Rod--
Glad it worked out for you...
I can't believe I got an answer to this question so fast.
It's kind of similar to another complaint, which is that the localizations for other languages sometimes don't include "The" any more, so people whose language was set to French or German were looking for a way to put it back. So I just made the leap from addiing it to just trying to comment it out...
you have to use the remote control to type the 3 digit # of that artist or album.
How does that work if you have more than 999 albums or artists?
It also makes me wonder how I-Tunes would handle the artist "The The"? Infinite loop?
Well, that is their address, so maybe. Seriously, though, it just finds the first "The " and puts it at the end. If you look at the lines you commented out, they're in pairs. The first is the search string and the second string tells iTunes how to replace it. So "The The" would end up as "The, The" for sorting purposes.
cheers,
charlie
Maybe you are looking for
-
I am having problems connecting my macbook air to an external display
I recently purchased a 2012 MacBook Air, and am currently running Mountain Lion. When I try to connect an external VGA overhead projector, for use in a conference room, using the Thunderbolt to VGA adapter, my screen resolution changes, but nothing i
-
How do I add the WMV extension to my Mac?
How do I add the .wmv extension to my Mac?
-
Item Interface error - "The Cost of Sales Account specified is not a valid"
A week back we migrated from 11.5.10 to 12.1.3 Since then, many items are failing in Item Interface with the error "The Cost of Sales Account specified is not a valid account or has expired in organization ITEM MASTER INV." Item Master being the 'Inv
-
Inserting your own sql-statements in JSP
How do I use my own sql-statements in JSP combined with the ones generated by JDeveloper? It seems to me that the following sentences are the ones generating the sql for inserting in a database: <jbo:DataSource id="ds" appid="MimPKG.MimPKGModule" vie
-
Hi all, I have a WAD report in Bi7. In the report, I need to truncate the Text Element 'Variable description' . Suppose if I have 'Material Multiple Entry, User ENtry' as variable description, then i want to display it as 'Material' only! How to do