New Blog Post: Saving Current Values with Cascading LOVs
All,
Just blogged on Saving Current Values with Cascading LOVs: http://bit.ly/hQPUPi
Enjoy!
Regards,
Dan
Monty,
Glad to hear it's working for you.
Oh, you just had to go there ;) Popup LOVs are a bit more difficult because the values are not automatically brought back to the page for you. I've already worked out how this could be implemented in my head - but writing it up, of course, is more of an effort. I've added it to my list of blog articles to write on. Since it's not a requirement right now, I'll cover another topic first and come back to that one afterward.
Regards,
Dan
Blog: http://DanielMcGhan.us/
Work: http://SkillBuilders.com/apex/
Similar Messages
-
This is just FYI about the new blog post for Windows Server 2012 R2, "Deploy Border Gateway Protocol (BGP) with the RRAS Multitenant Gateway," at
http://bit.ly/OfDkty
James McIlleceHi,
Thanks for sharing and it would be greatly helpful to anyone who has requirements for that.
Best regards,
Susie -
Comparing the current value with the previous one in Powershell
Hi,
New to scripting and i was wondering how can I compare the current value with the previous value?
I am having trouble with the loop structure, and I am not sure I am on the right track...
I am trying to compare the record to next record in the same csv file after import-csv... My code runs fine, but is not giving the right result.
$FilePath = Get-FileName -initialDirectory "C:\"
#Testing for null
If($FilePath)
$Data = Import-csv -Path $FilePath | Sort-Object BUYER, {[int] $_.PO_NBR}, {[int] $_.LINE_NBR}
Foreach($fData in $Data)
$i = $fData
Foreach($i in $fData)
if($fData.Buyer -eq $i.Buyer)
#save all the same buyer name to a new variable
Write-Host "Same as previous"
Else
Write-Host "Variable is null"
Remove-Item function:\Get-FileNameThank you. The Foreach loop is now working properly.
Can I ask what is the purpose of "-ea 0" in the import-csv? I can't seem to find "-ea" as a parameter for import-csv in help.
-ea is short for -ErrorAction.
Don't retire TechNet! -
(Don't give up yet - 13,225+ strong and growing) -
Just FYI, new blog post "Windows Server Networking Resources"
Hi there -
Just FYI, new blog post "Windows Server Networking Resources" at
http://aka.ms/vrigwx
Thanks -
James McIlleceHi James,
Thanks for the sharing.
Best Regards.
Steven Lee
TechNet Community Support -
Just FYI, new blog post "More Windows Server 2008 Guides Available in TechNet Gallery"
Just FYI, new blog post "More Windows Server 2008 Guides Available in TechNet Gallery" at
http://aka.ms/Sqatv1
Thanks -
James McIlleceHi James,
Thanks for your sharing!
Best Regards.
Steven Lee
TechNet Community Support -
Just FYI, new blog post "New and Revised Networking Technologies for Windows Server Technical Preview" at
http://aka.ms/xb9l0w
Thanks -
James McIlleceHi,
Thanks for your good sharing.
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] -
Just FYI, new blog post "Deploy BranchCache Content and Hosted Cache Servers Using Windows PowerShell" at
http://aka.ms/le85n3
Thanks -
James McIlleceGreat to see new BranchCache content out there!
We created a BranchCache info page to try to get all of the relevant info into one place for V1 and 2
http://2pintsoftware.com/microsoftbranchcache
thanks
Phil
Phil Wilcock http://2pintsoftware.com @2pintsoftware -
Just FYI, new blog post "New Posterpedia Content Now Available"
Just FYI, new blog post "New Posterpedia Content Now Available" at
http://bit.ly/1IYdFMA
Thanks -
James McIlleceGreat to see new BranchCache content out there!
We created a BranchCache info page to try to get all of the relevant info into one place for V1 and 2
http://2pintsoftware.com/microsoftbranchcache
thanks
Phil
Phil Wilcock http://2pintsoftware.com @2pintsoftware -
Compare current value with previous value
Hello,
I would like to compare the current value with the previous value of the current value.
How can I solve this problem?
MauritsHi,
after going through the basics course you surely can understand that example:
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
Compare the current value with the previous value in the same column
Hi all,
I have to include a statement in a query which allows to compare the current value of column A with the previous value of column A (same column). from there, I need to add a condition in order to have the expected result.
Let's take an example to illustrate what I want to achieve:
I have the following columns in table called 'Charges':
Ship_id batch_nr Order_nr Price
SID1111 9997 MD5551 50
SID1111 9998 MD5552 50
SID1111 9999 MD5553 50
SID2222 8887 MD6661 80
SID2222 8887 MD6662 80
SID2222 8887 MD6662 80
SID3333 6666 MD7771 90
I want to check if the ship_id of row 2,3 (and more if available) is equal to the ship_id of row 1.
If it is the case, then value 'together with the first batch_nr' in row 2 and 3 under Price column. If not, then keep the original value of Price column
PLease see below the expected result:
Ship_id batch_nr Order_nr Price
SID1111 9997 MD5551 50
SID1111 9998 MD5552 together with 9997
SID1111 9999 MD5553 together with 9997
SID2222 8887 MD6661 80
SID2222 8887 MD6662 together with 8887
SID2222 8887 MD6663 together with 8887
SID3333 6666 MD7771 90
Thanks in advance for your help, it is really urgent.
Imco20030Hi,
user11961002 wrote:
Hi,
Here is the query that I use:
[ select
sl.ship_id,
o.ordnum,
o.reffld_5 "BatchNR",
sum(tc1.chrg_amt) "FreightPRC",
sum(tc2.chrg_amt) "FuelPRC",
sum (tc1.chrg_amt + tc2.chrg_amt + tc3.chrg_amt) "Total Price"
from ord_line ol
join ord o on (ol.ordnum = o.ordnum and ol.client_id = o.client_id)
join shipment_line sl on (ol.ordnum = sl.ordnum and ol.client_id = sl.client_id and ol.ordlin = sl.ordlin)
join adrmst a2 on (o.rt_adr_id = a2.adr_id)
left join tm_chrg tc1 on (tc1.chargetype = 'FREIGHT' and tc1.chrg_role = 'PRICE' and tc1.ship_id = sl.ship_id)
left join tm_chrg tc2 on (tc2.chargetype = 'FUELSURCHARGE'and tc2.chrg_role = 'PRICE' and tc2.ship_id = sl.ship_id)
where sl.ship_id = 'SID0132408'
group by o.client_id, o.ordnum, o.reffld_2, sl.ship_id, a2.adrnam, a2.adrln1, a2.adrpsz, a2.adrcty, a2.ctry_name,
o.reffld_5, ol.early_shpdte
order by ship_id
]That looks like the query you were using before you started this thread.
Modify it, using the analytic fucntions FIRST_VALUE and LAG, like I showed you.
I see that you did simplify the problem quite a bit, and it's good that you did that.
It doesn't matter that your real problem involves joins or GROUP BY. Analytic functions are calculated on the results after all joins and GROUPS BYs are done. Just substitute your real expressions for the simplified ones.
For example, in your simplified problem, there was a column called order_nr, but I see now that's it's really called o.ordnum. Where the solution I posted earlier says "ORDER BY order_nr", you should say "ORDER BY o.ordnum".
Here's a less obvious example: in your simplifed problem, there was a column called price, but I see now that it's really SUM (tc1.chrg_amt + tc2.chrg_amt + tc3.chrg_amt). Where the solution I posted earlier says "TO_CHAR (price)", you should say "TO_CHAR (SUM (tc1.chrg_amt + tc2.chrg_amt + tc3.chrg_amt))". (You can't use an alias, like "Total Price", in the same SELECT clasue where it is defined.)
I removed some columns from the select as they are not relevant for the wanted action like 'adress details or other references'.
Now here is the result:
Shipment ID Order Number WMS Batch Freight Fuel Price Order Total Price
SID0132408 MDK-000014-05602649 04641401 110 10 120
SID0132408 MDK-000014-05602651 04641402 110 10 120
SID0132408 MDK-000014-05602652 04641363 110 10 120
as you can see, the 3 orders have the same shipment ID.
The expected result should be shown under column 'Total Price' as follows:
Shipment ID Order Number WMS Batch Freight Fuel Price Order Total Price
SID0132408 MDK-000014-05602649 04641401 110 10 120
SID0132408 MDK-000014-05602651 04641402 110 10 tog with 04641401
SID0132408 MDK-000014-05602652 04641363 110 10 tog with 04641401Okay, so those are the correct results that I asked for, plus the incorrect results you're getting now. Thanks; extra information doesn't hurt.
But where is the raw data that you're starting with?
It looks like you tried to format the code (but not the results) by typing this 1 character:
before the formatted section and this different character
after the formatted section. To post formatted text on this site, type these 6 characters
before the formatted section, and the exact same 6 characters again after the formatted section. -
Error when creating new blog post
I recently upload the file size limits to the user for the Blojsom server. Now when users try to upload anything or even create a new post, they are greeted with a white screen. They can go back to the first screen, but they cannot create or load anything into their blog. Any help would be appreciated.
Here is the error text I am receiving when trying to post a blog entry. I highlighted what I think is the error, but I'm not sure what it means.
java.lang.NullPointerException
at com.apple.blojsom.plugin.inlineadmin.InlineAdminPlugin.process(InlineAdminPlugi n.java:442)
at org.blojsom.servlet.BlojsomServlet.service(BlojsomServlet.java:441)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:193)
at org.blojsom.filter.CompressionFilter.doFilter(CompressionFilter.java:92)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:193)
at org.blojsom.filter.PermalinkFilter.doFilter(PermalinkFilter.java:208)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNe xt(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNe xt(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNe xt(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java :171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNe xt(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNe xt(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:17 4)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNe xt(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:6 66)
at java.lang.Thread.run(Thread.java:552)
XServe G5 Mac OS X (10.4.7)
XServe G5 Mac OS X (10.4.7) -
Compare few columns current value with previous version within a table
I have a table that stores version information. Everytime there is a change in one field, a new version is created. I need to get the last value and the current value (after the update). There might be around 12 columns that I need to check for any updates.
How may I achieve this?
Any help greatly appreciated.
Thx!Perhaps you're looking for something like
SELECT col1, col2, col3, ... colN
FROM (
SELECT col1, col2, col3, ... , colN, RANK() OVER (ORDER BY update_date DESC) rnk
FROM your_table
WHERE rnk <= 2It would be very helpful in general, if you could provide DDL
SCOTT @ jcave102 Local> create table a (
2 version number,
3 create_time timestamp,
4 col1 number,
5 col2 number,
6 col3 number
7 );
Table created.
Elapsed: 00:00:00.06scripts to insert the data
SCOTT @ jcave102 Local> insert into a values( 1, systimestamp - interval '3' hour, 10, 10, 10 );
1 row created.
Elapsed: 00:00:00.04
SCOTT @ jcave102 Local> insert into a values( 2, systimestamp - interval '2' hour, 10, 9, 9 );
1 row created.
Elapsed: 00:00:00.01
SCOTT @ jcave102 Local> insert into a values( 3, systimestamp, 8, 9, 9 );
1 row created.
Elapsed: 00:00:00.01
SCOTT @ jcave102 Local> commit;
Commit complete.
Elapsed: 00:00:00.00And a description of exactly what you want the results to look like given that data,
VERSION COL1 COL2 COL3
3 8 9 9
2 10 9 9If we have those things, it's relatively easy for us to follow exactly what question you're asking and to write a query that generates the expected output, i.e.
1 select version, col1, col2, col3
2 from( select version, col1, col2, col3, rank() over (order by create_time desc) rnk
3 from a )
4* where rnk <= 2
SCOTT @ jcave102 Local> /
VERSION COL1 COL2 COL3
3 8 9 9
2 10 9 9
Elapsed: 00:00:00.01Otherwise, we have to guess at exactly what you're trying to get and we'll almost always guess incorrectly a couple of times.
Justin -
Getting my blog posts from IWeb interfaced with Facebook
How do I get my blog posts, created on IWeb, and through Networked Blogs to sync with my Facebook page? I cant seem to get the individual posts available to post in my Facebook status bar. No posts from blog are visible...any ideas?
i have the same problem. and i also want to add a share button on every post so people can share it through their status on facebook. do you know how to do it? anyone?
-
Dynamic Change event getting error with cascading LOV's
Hi all,
In my application (v4.0.0), I have two sets of cascading drop-down select lists, these each make up a date (year, month, day) plus a time value (not cascading).
I also have a dynamic action that gets the hours difference between the two dates set above. This fires on the change event.
When I change, say the month drop-down, the day list is refreshed. But before it is refreshed, it looks to be emptied and the change event fires. I then get an error from the dynamic action because the day value passed to the query is empty (confirmed when looking at POST data).
Can anyone think of a workaround idea for this? e.g. a way to set the dynamic action to conditional?
Thanks!Hi Peter
Thanks for the tip, I have tried this and it has helped, although not solved the problem. I was originally getting two errors appear ("AJAX call returned server error ORA-01843: not a valid month for Set Value.") and this has removed one of them...
When looking in Firebug, it seems to me that although the dynamic actions (cascading update + set value) are running one before the other, the values aren't updated in order. e.g. the cascading update is not applied before the set value action is run.
Could this be a bug with dynamic actions? -
Resetting a Form with Cascading LOVs (Apex 4)
A standard reset button cannot reset cascading LOVs properly. Let's assume we have a parent LOV and a child LOV. When one changes the selection in the child LOV, reset can undo this. But when he changes the selection in the parent LOV, reset will undo only the parent LOV but not the child LOV. The child LOV remains unchanged (however the selection is lost) and therefore shows a list that does not correspond to the entry now shown in the parent LOV.
Has anybody found a solution for this, a reset action that can reset cascading LOVs completely and properly?
Regards
RolandRoland,
i didn't try this myself but maybe you succeed with triggering the onchange-event of your parent-select-list (this should cause the child select-list to be refreshed).
Or you could try if a form region has a apex "refresh" event (i know that refresh works on reports).
brgds,
Peter
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
BuilderPlugin: http://builderplugin.oracleapex.info
Work: http://www.click-click.at
Maybe you are looking for
-
How do i use an active directory group for vpn and not all user
hi all, i have an asa 5515x... how do i use a particular group in active directory to have vpn/anyconnect access? right now i believe it's for all user on my current config, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !integrate with active d
-
Will boot image on external drive work for powerbook g4
I've recently upgraded to a Powerbook G4 17-inch computer. Prior to that I had a Mac mini with tiger running on it. I used Carbon Copy Cloner to backup the mac mini to an external HD via firewire. Is it possible for me to boot my powerbook g4 from th
-
Keep getting "itunes has stopped working" error.
Keep getting "itunes has stopped working" error. Just updated to windows 8.1, updated java (i installed java on windows 8 for work), & ran the solve a problem with itunes fix from my pc. Still crashes when i go to itunes store or try to sync my ipod.
-
Custom-style outline template with prompts and glossary page
Hello I would like to make a template in Word 2010 with a custom-style outline. Would anyone be able to suggest how to achieve these requirements (pointing me to reading material also helpful): 1. Every phrase the user types into a field gets automat
-
Storing Documents (Word, .PDF, etc) & Searching Across & Within
Can any one direct me to a document or resource that describes how configure document storage (Word, .PDFs, etc.) and searching capabilities across the indexing - meta data, and/or within the documents for key words or phrases. Any feedback is greatl