How to get the original query string in an event receiver when dialogs are enabled
I have scenario where I am adding a document to a document library which has an external data column on it. My goal for this column is to have it automatically populated with an appropriate value based on original query string to the page. The general
idea is that I am on a custom page that has various webparts on it including a view of my document library that is context sensative based on the query string, and I want to use that context sensitivity not just to filter the list but also when adding documents.
I have been searching around for solutions to this problem all day and have gotten this far:
I have an event receiver attached to my document library that handles the ItemAdded event syncronously (as such I have the new list item available to me). In that event receiver I am able to set the column values as required. Where I am stuck is on getting
the value from the query string that I need to actually set as the column value.
Based on:
http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/8cfcb299-9a55-4139-86ec-0b53b2922a54 and several similar articles/posts I have been able to get the original source Url with the query string I want via the following
code in my event receiver:
private HttpContext context;
public EventReceiver1()
context = HttpContext.Current;
public override void ItemAdded(SPItemEventProperties properties)
var originalQueryString = context.Request.QueryString["Source"];
// Parse the query string and use the value ...
The problem is that this solution breaks down if the dialogs are turned on under the advanced settings for the list. The reason the solution fails is because the "Source" query string parameter goes away and is replaced by "IsDlg" set to a value of "1".
Does anyone know how to get past this hurdle? Any help would be greatly appreciated.
Hi Stuart,
The reason I'm looking for "Source" in the query string is because that is something I found to be reliable when the Dialogs are turned off. I've dug around pretty deep in the Request object to see if anything had the data I was looking for and unfortunately
it doesn't appear to be there. The
context.Request.QUeryString.ToString()
returns a rather simple one of:
List=%7b43ECDCB0-8440-4652-B067-AA20481779D7%7d&RootFolder=&IsDlg=1
and the
context.Request.UrlReferrer.Query.ToString()
has the same value.
I suspect this is due to the dual step process that takes place in adding an item to a document library where the first modal popup (which I suspect likely has the information I need) gives you the opportunity to browse to your file and then the second
dialog (maybe this is getting brought up as a result of another request which is now referring back to the original request that brought up the first dialog?) where you edit your properties.
Thanks for the try though, if you've got anything else I'd love to hear it.
Similar Messages
-
How to get the original version of Web report in BW ?
Hello Friends ,
I have transported one Web report from BW development to BW Production System.
But unfortunately , the desired result not me met .
So I have been asked to keep the original version of the Web report.
As the new version of Web report has replaced the previous one ,
So could anybody tell me how to get the original version of Web report in BW ?
Many thanks in advance !!!!!!!!Hi,
You can use the Transaction STMS choose the option "Import Overview" . In the GOTO tab select "History" and choose "Import History".
Here you can find the history of requests imported to the prod system.
Regards,
K.Manikandan. -
How to get the value of String in integer type
how to get the value of String in integer
{color:#0000ff}http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#parseInt(java.lang.String)
http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#valueOf(java.lang.String){color} -
In iphoto how to get the gold you delete a photo warning message when you check the box not ask
in iphoto how to get the gold you delete a photo warning message when you check the box not ask
Try trash the com.apple.iPhoto.plist file from the HD/Users/ Your Name / library / preferences folder.
(On 10.7 or later: Hold the option (or alt) key while clicking on the Go menu in Finder to access the User Library)
(Remember you'll need to reset your User options afterwards. These include minor settings like the window colour and so on. Note: If you've moved your library you'll need to point iPhoto at it again.)
What's the plist file?
For new users: Every application on your Mac has an accompanying plist file. It records certain User choices. For instance, in your favourite Word Processor it remembers your choice of Default Font, on your Web Browser is remembers things like your choice of Home Page. It even recalls what windows you had open last if your app allows you to pick up from where you left off last. The iPhoto plist file remembers things like the location of the Library, your choice of background colour, whether you are running a Referenced or Managed Library, what preferences you have for autosplitting events and so on. Trashing the plist file forces the app to generate a new one on the next launch, and this restores things to the Factory Defaults. Hence, if you've changed any of these things you'll need to reset them. If you haven't, then no bother. Trashing the plist file is Mac troubleshooting 101. -
hi Guys,
i make the application, in which lots of data record with id, whenever i clicked to the SUBMIT button, it wil forwarded to the next page.
But The problem is.....when we pass the 30 id in a query string parameter that' fine but when it is incresing it is not transfaring to the next page. how i can do this.
As per the concept EVERY BROWSER HAVING THE LIMITATION..
hope all of u help me.
saMhey all of you are saying right..!!
But you know the doPost() method having the limitation, that is
1 MB. so how can i used this method.
I know the second way....Like make the hidden control with mantain the session, but i can not use this(Client do't want this).
so please guys help me........
saM -
How to get the SQL Query statement of a Search Form ?
Hi all,
We have a requirement to send the query result of an ADF Search Form into report application (Crystal rpt).
Crystal can accept data source as query statement. SO I think of getting the exact query statement "generated" by the ADF Search form and send it to crystal.
Is this possible ?
Thank you very much,
xtantoTry the various get methods of the viewObject such as getQuery:
http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtAnchor.getQuery%28%29/vtTopicFile.bc4jjavadoc%7Crt%7Coracle%7Cjbo%7CViewObject%7Ehtml/ -
How to get the Actual Query of View Object
Hi all,
I have a standard. I need to modify the query of the VO attached to a picklist based on responsibility. I am able to achieve my requirement but it is getting reflected for all the responsibilities even though i extended the controller for a particular responsibility. I used setQuery() to change the query of my VO. When checking "About this page". The code i added also shown in the page. Now i want to get the actual query to the VO before the controller is extended so that i can set the modified query or actual query based on my responsibility. Kindly share your knowledge.
Regards,
PradeepHi,
I guess following query will not work ,Why use 2 where clauses.
SELECT * FROM (select NVL(VENUE_NAME,' ') "Venue",
NVL(VENUE_CITY,' ') "City",
NVL(COUNTRY_DESC,' ') "Country",
EVENT_NUMBER
From NS_EVENT_VENUE_DETAILS,NS_COUNTRY_MASTER WHERE COUNTRY_CODE = VENUE_COUNTRY) QRSLT WHERE (QRSLT.EVENT_NUMBER = 1539
you can as following using bind variable.
http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcquerying.htm#CEGDGIJH -
How to get the individual query terms?
Is there a way in Intermedia to get the individual query terms that are expanded by intermedia after a query using stemming or fuzzy matching.
Example: a query like "$distinguish" expands to distinguish, distinguished and distinguishes.
CTX_DOC.MARKUP does the work but returns the complete contents (with markup) of the indexed column in stead of the query terms only.1 with t as
2 ( select 1 day_from, 3 day_to from dual)
3 select day_from +level -1 day_from, day_to
4 from t
5* connect by level <= day_to
SQL>
SQL>/
DAY_FROM DAY_TO
1 3
2 3
3 3 -
How to get the request xml string in Business service.
Hi
I have following requirement
1) XAI inbound service will get a input xml request feed and call the Business Service.
2) Business service will do some validation and do the insert in the database.
My BS schema is as below
<schema pageAction="change">
<personId mapField="PER_ID"/>
<personOrBusiness mapField="PER_OR_BUS_FLG"/>
<name mapField="ENTITY_NAME" mdField="C1_ENTITY_NAME"/>
<emailAddress mapField="EMAILID"/>
<city mapField="CITY"/>
<county mapField="COUNTY"/>
<postal mapField="POSTAL"/>
<houseType mapField="HOUSE_TYPE"/>
<taxVendorGeographicalCode mapField="GEO_CODE"/>
<isInCityLimit mapField="IN_CITY_LIMIT"/>
<state mapField="STATE"/>
<version mapField="VERSION"/>
<division mapField="CIS_DIVISION"/>
<accessGroup mapField="ACCESS_GRP_CD"/>
<address1 mapField="ADDRESS1"/>
<personCharacteristic type="list" mapList="CI_PER_CHAR">
<personId mapField="PER_ID"/>
<characteristicType mapField="CHAR_TYPE_CD"/>
<characteristicValue mapField="CHAR_VAL"/>
<effectiveDate mapField="EFFDT"/>
<adhocCharacteristicValue mapField="ADHOC_CHAR_VAL"/>
<characteristicValueForeignKey1 mapField="CHAR_VAL_FK1"/>
<characteristicValueFK2 mapField="CHAR_VAL_FK2"/>
<characteristicValueFK3 mapField="CHAR_VAL_FK3"/>
<characteristicValueFk4 mapField="CHAR_VAL_FK4"/>
<characteristicValueFK5 mapField="CHAR_VAL_FK5"/>
</personCharacteristic>
</schema>
The request XML to BS is as below_
(support.schema.AbstractSchemaBasedDispatcher) Performing page:change of BusinessService CM_SPRDSHT_BS' (service='CMSPRDHSHTUPLD'), with input request
<?xml version="1.0" encoding="UTF-8"?>
<CM_Person>
<personOrBusiness>P</personOrBusiness>
<name>Marsh,Corporate</name>
<emailAddress>[email protected]</emailAddress>
<city>Tampa</city>
<country>USA</country>
<postal>2131</postal>
<houseType/>
<taxVendorGeographicalCode/>
<isInCityLimit/>
<state>CA</state>
<version>1</version>
<division>930</division>
<accessGroup>***</accessGroup>
<address1>Address of Khan</address1>
</CM_Person>
I can access the values of each xml node in BS with the help of data item.
I wanted to know how can I get the above request xml string in my Business Service in Java.{color:#0000ff}http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#parseInt(java.lang.String)
http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#valueOf(java.lang.String){color} -
How to get the GTRID in string form
Hello,
I would like to include the Global Transaction Identifier (GTRID) in my
application level logs. Preferrably it will be in the same format as it is
in the ULOG.
Is there a function to get the GTRID?
Once retrieved, is there a function to convert the GTRID into a string
equivalent to how it is presented in the ULOG?
We are using WLE 5.x (Corba).
Thanks...
Roger
Roger W. Fischer
North Vancouver, BCTuxedo uses GTRIDs internally, but externally documented functions make use
of XIDs, which is the official transaction ID format used in the XA
standard. (tpsuspend() and tpresume() make use of TPTRANID, which is
another internal data structure.)
The best approach would be to use userlog() for your application logging, in
which case you will get the GTRID as part of your log message whenever it is
present.
If you want to use XIDs, you can call
tx_info(&traninfo);
to get a binary XID and you can format this XID to a string format using
tpconvert(string_xid, &traninfo.xid, TPTOSTRING|TPCONVXID);
It is possible to pass this string_xid as a key field in a call to the
T_TRANSACTION MIB class, and TA_GTRID will be among the returned FML fields,
but the TA_GTRID MIB attribute is not officially documented.
"Roger W. Fischer" <[email protected]> wrote in message
news:[email protected]..
Hello,
I would like to include the Global Transaction Identifier (GTRID) in my
application level logs. Preferrably it will be in the same format as it is
in the ULOG.
Is there a function to get the GTRID?
Once retrieved, is there a function to convert the GTRID into a string
equivalent to how it is presented in the ULOG?
We are using WLE 5.x (Corba).
Thanks...
Roger
Roger W. Fischer
North Vancouver, BC -
How to get the dynamic query result
If in one query, there is the amount range dimension, based on different dimension value combination, the customer revenue should be refreshed into different range, how to make it by cube?
eg.
Customer Store Material Month Amount
C001 M & S Tennis 2005/01 "10"
C001 Douglas Tennis 2005/02 "60"
C002 M & S Soccer 2005/01 "1"
C002 M & S Soccer 2005/02 "50"
C002 M & S Tennis 2005/02 "50"
C003 Douglas Tennis 2005/01 20
Query condition:
Time Customer Amount Range Amount
2005 C001 0~50_____________0
2005 C001 51~100___________70
2005 C001 100 +____________0
2005 C002 0~50_____________0
2005 C002 51~100___________0
2005 C002 100+_____________101
2005 C003 0~50_____________20
2005 C003 51~100___________0
2005 C003 100+_____________0
However, if I drill down Time into month, the result is total different, I only list the result related to customer C001
Time Customer Amount Range Amount
2005/01 C001 0~50____________10
2005/01 C001 51~100__________0
2005/01 C001 100 +___________0
2005/02 C001 0~50____________0
2005/02 C001 51~100__________60
2005/02 C001 100 +___________0
Any good solution on that? Thanks for any input.
Message was edited by: Lei ShaoHi, Sen,
I used your solution in my infocube and query, where I created a structure with 'between'. However, it is still the simple summation in different amount range.
Just like the following:
Sales ORG / Sales Office / Sales Rep / Amount
East / Atlanta / 1001 / 3
East / Atlanta / 1002 / 4
So the query result is the same:
S-ORG / S-Office / S-Rep / Amount Range / Amount
East / Atlanta / 1001 / 0~5 / 3
East / Atlanta / 1001 / 5+ / 0
East / Atlanta / 1002 / 0~5 / 4
East / Atlanta / 1002 / 5+ / 0
When I remove 'drill down' for Sales Rep, the result is:
S-ORG / S-Office / Amount Range / Amount
East / Atlanta / 0~5 / 7
East / Atlanta / 5+ / 0
However our expection for the result is different, because in business traction, if we remove sales rep, the sales org and sales office will get the sub-total like this: (we can image it with ABAP program sub-total)
Sales ORG / Sales Office / Amount
East / Atlanta / 7
So our expection for the result is:
S-ORG / S-Office / Amount Range / Amount
East / Atlanta / 0~5 / 0
East / Atlanta / 5+ / 7
Therefore, any good suggestion for this?
Thanks a lot
Regards,
LS -
How to get the sql query result?
Hi,
Currently I am using LV2012 to connect a Oracle database server. After the installations/settings for Oracle Express and Oracle ODBC driver done.
I am sucessfully to use the SQL command to query the data through my window command prompt.
Now the problem is, how I do the same task in Labview by using the database connectivity toolkits?
I have build a VI for query as attached, but i have no idea what pallete to use to get the query result.
Please help me ~~
Solved!
Go to Solution.
Attachments:
Query.vi 9 KBHere is a piece of code I use to test SQL commands, you can use the part that retrieves sql results.
It is also possible to get the column headers back, but that is for next lesson!
Attachments:
RunSQLCommand.vi 30 KB -
How to get the original record Number in Multi-Record Block
Hello Everyone,
I know how to find the duplicate item in the multi-Record block,
For Ex:
Line_Num Item_Name Quantity
1 AA 10
2 BB 20
3 AA Here 3rd record Item_name is duplicated, I can able to check and display the message that 'Item is duplicated' ,I found from [sheikyerbouti.developpez.com/duplicates/duplicates.htm] .
but I want to show along with original line number i.e 1 when the item_name is entered .
Here I want to check the original Line_Num and want to display the message
'Item is duplicated,Update quantity in Original Line 1'
Can anyone help me to get this?
Thank You.
Regards,
Guru.Hi Francois,
Actually I want to check and show the message when the item_name is entered i.e WHEN-VALIDATE-ITEM TRIGGER.
I put the following code in WHEN-VALIDATE-ITEM TRIGGER
Declare
curnum number;
dupnum number;
cur_item varchar2(100);
v_alert_no number;
p_linerec varchar2(100);
Begin
curnum := TO_NUMBER(:System.Trigger_Record);
cur_item := :Lines.Item_number;
First_Record;
p_linerec := :Lines.Item_number;
LOOP
If p_linerec = cur_item then
dupnum := :Lines.Line_num;
set_alert_property('ALERT_STOP',ALERT_MESSAGE_TEXT,
'Duplicate Item Found,Update QTY in Original line number '||dupnum);
V_ALERT_NO := show_alert('ALERT_STOP');
:LINES.ITEM_NUMBER := NULL;
:LINES.ITEM_DESCRIPTION:= NULL;
:LINES.ITEM_REVISION:= NULL;
:LINES.ITEM_CATEGORY:= NULL;
elsIF (:System.Last_Record = 'TRUE') THEN
Go_Record(curnum);
EXIT;
ELSE
Next_Record;
END IF;
END LOOP;
End; But I am getting the following error,
FRM-40737:Illegal Restricted Procedure
FIRST_RECORD in WHEN-VALIDATE-TRIGGERand then
its showing for first line itself.
Duplicate Item found.Update QTY in Original line number 1so I put the condition
If :Lines.Line_num > 1 then --Only to check when the block having more than one record.but now it checking from second record and displaying,
Duplicate Item found.Update QTY in Original line number 2 --(instead of Update QTY in Original line number 1)Can you tell me how can I change the above code for my requirement?
Thank you.
Edited by: Gurujothi on 27 Mar, 2013 5:20 PM -
How to get the original file name in chinese with upload component?
It is inconvenience for user to upload file with name only in english. When upload a file with chinese file name, the file name gotten from "fileUpload1.getUploadedFile().getOriginalName()" is just like "缃戠粶鍥�.jpg". Do somebody have a good idea?
I spoke to the component engineers regarding this issue
First please check if the s page encoding is set correctly, as browsers tend to default to use the encoding that was used for the page when submitting the request.
(Because of how the JSF response writer is written, multibyte characters can be written correctly even if the encoding is not set correctly so the fact that form correctly rendered chinese characters is not proof that the encoding was set correctly).
If you established that the page encoding is correct, then there is a
bug in the FileUpload. The method that gets the name is a straight
shot through to an Apache FileUpload library method. Technically this
ought to be resolved by that method checking the request body
character set before parsing the parameters.
- Winston
http://blogs.sun.com/roller/page/winston?catname=Creator -
IPhone: How to get the original photo image with Picker
Hi!
I'm trying to pick and send (via HTTP) the original image taken by the camera, the 1,600 x 1,2000 image that's available in iPhoto after syncing.
As far as I gathered, the UIImage doesn't help me here, since it's scaled down to 640x480, probably to safe memory. But one should supposedly be able to access the underlying CIImage.
Here's what I'm doing right now:
I'm setting up an ImagePickerController in my
- (void)viewDidLoad
imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.delegate = self;
imagePickerController.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self refreshView:self];
and process the picked image with
- (void)imagePickerController:(UIImagePickerController )picker didFinishPickingImage:(UIImage )image editingInfo:(NSDictionary )editingInfo
CGImageRef imgRef = image.CGImage;
CGFloat owidth = CGImageGetWidth(imgRef);
CGFloat oheight = CGImageGetHeight(imgRef);
NSLog(@"Original size = %f %f",owidth,oheight);
NSData imageData = [NSData dataWithData: UIImagePNGRepresentation(image)];//(image, 1.0)
However, I still get the following output:
2008-07-25 11:44:58.543 myApplication[1564:20b] Original size = 640.000000 480.000000
Obviously still scaled down - but there must be a way to access the original.
What am I doing wrong?Yes, I'm trying on the iPhone, as the camera is unavailable on the simulator.
Here is the code I'm using:
// In my main code, to initialise the picker
UIImagePickerController *picker;
// Check if camera is available
if ( ![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera] )
UIAlertView *alertView = [[UIAlertView alloc]
initWithTitle:@"Can't access camera" message:@"The camera is unavailable!" delegate:nil cancelButtonTitle:nil otherButtonTitles:@"OK", nil ];
[alertView show];
[alertView release];
return;
picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.delegate = self;
[_myView addSubview:picker.view];
[_myView performSelectorOnMainThread:@selector(setNeedsDisplay) withObject:nil waitUntilDone:NO];
// The delegate methods
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo
NSLog( @"Image dimensions: %fx%f", image.size.width, image.size.height );
// Remove the picker interface and release the picker object.
[picker.view removeFromSuperview];
[picker release];
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
// Remove the picker interface and release the picker object.
[picker.view removeFromSuperview];
[picker release];
}
Maybe you are looking for
-
How can I sync music on my Iphone with a Mac that previously had an different Itunes account.
Im having trouble syncing my playlist to a previously owned Mac. It keeps telling me that my Iphone is already synced to a device and will be erased in order to sync with the previously owned Macs library. Im not concerned about keeping the music alr
-
Transferring documents from a PC to Mac Book Pro - permissions
I was using Dropbox to transfer "My Documents" on old PC to my new Mac Book Pro. I was losing some documents in the process, so decided to transfer with DVDs. I have now placed them into the Mac's Documents folder, but when I go into any of the doc
-
Hello, I am trying to put a validation on an item. I have two columns: Ethics Status and Ethics Tracking Number Ethics Status is required but Ethics Tracking Number is only Required if Ethics Status is Yes. I am unsure how to go about doing this. Can
-
Change the MacAir with MacbookPro
I have the macbook air 128 G 11inches...it is new and with out any problem. can I change it with Macbook pro 13inches? if yes how can i do that? and what is the conditions?
-
Hi, I have configured tax code in one client in development and want to transport the same to another client in development. I just wanted to know if i can include both the tax code rates and OB40 settings in the same transport request. My question i