Current context
Hello.
I have my aplicattion in a *.war* file. How I can get the real path of my aplicattion. The jar file have a *.jarper* file; it need real path of image files. If I set path in hardcode, my application will be OS dependent.
Can I use other methodology?.
gusamasan
You must OMBCC to the module first, that is:
OMBCC <MODULE NAME> before excuting OMBCREATE.
Regards,
Robert
Similar Messages
-
The name '' does not exist in the current context
I have a recurring problem where all of a sudden I can no longer see the values of my variables when I debug my unit tests. I cannot find a pattern as to when this happens but I experience this across one of every 20 tests that I write. Occasionally this
has also happened during normal debbuging of running code on my machine.
I have included 2 screen shots. The first is when it is working. I have a break point set at the declaration of list of types. At this point all my variables are still reporting their values back to the debugger. Once I step over this to the next line (screen
shot 2) I get the error message 'The name '[variable name]' does not exist in the current context'
This problem is annoying me to no end. If anyone has any insight as to why this might be happening I would be very much appreciative.
My Settings/Configuration
Using Visual Studio 2013 Premium (Version 12.0.31101.00 Update 4)
Projects are all set to Target Framework = .NET 4.5.1
Resharper 9.1 is installed
My active configuration is debug mode, Any CPU
My PC is 64bit and so is the O/S windows 8.1
All of my projects are also compiled and built in debug mode
For all my projects configuration debug has the Optimize Code check box unchecked
I am unit testing code in an outside project referenced by the unit testing project (standard unit test project setup)
I make use of the latest version of NSubstitute in my tests although I do not think that would have any bearing on this issue
I omitted the code following the error because it is not relevant. I had cut it out and replaced it with a Task.Delay(4) which resulted in the same issue.
What I have tried so far
I have tried debugging the unit test from Visual Studio Test Explorer instead of from Resharper with the same result.
If I remove 2 items at the end of the array it starts to work again (so 6 items initialized instead of 8)
I clean solution with rebuild has no effect
Removing properties of the array also seems to work, example remove all initialization of property Value
Mark as answer or vote as helpful if you find it useful | IgorHi IWolbers,
>>I have a recurring problem where all of a sudden I can no longer see the values of my variables when I debug my unit tests. I cannot find a pattern as to when this happens but I experience this across one of every 20 tests that I write. Occasionally
this has also happened during normal debbuging of running code on my machine.
So you mean that it worked well before, am I right?
If you debug the same app in other VS machine, does it work well? So we could make sure that whether it is related to the VS IDE.
Please disable all add-ins in your VS IDE, and then reset your VS settings, debug it again.
https://msdn.microsoft.com/en-us/library/ms247075(v=vs.100).aspx
Or you could run your VS in safe mode, debug it again, at least, we could know that whether it is the add-in's issue.
https://msdn.microsoft.com/en-us/library/ms241278.aspx
To make sure that it is not the project files' issue, create a new blank solution, copy the project files to the new solution, clean and rebuild the solution, check the result.
>>Once I step over this to the next line (screen shot 2) I get the error message 'The name '[variable name]' does not exist in the current context'
How about debugging it with "Step Into" instead of "Step Over"? Or you could add breakpoints between 234 line to 241 line, after the breakpoint is hit, check the watch window again. How about the result?
In addition, do you check other debugger window like local or others?
Best Regards,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
I have two tables;
The first is my Order table which has a single row for each unique order - there are no duplicate order numbers.The order id column here is called
OrderID.
The second is my Submissions table which is similar to a transactions table, there are multiple submissions for every order. This table also contains an
OrderID column that contains the relevant OrderID.
The submission table also contains a calculated field called Date and a calculated field called
MaxDate field which is the date of the most recent submission that relates to any particular order in cases where there are multipple.
My goal is to add a column to the Order table this MaxDate column. The reason for duplicating the information rather than linking the tables is because I need to create more calculated columns in the
Orders table based on this value.
I have created a relationship between the two tables however when I use:
=RELATED(Submissions[MaxDate]
I get this error:
"...either doesn't exist or doesn't have a relationship to any table available in the current context"
I don't really understand why this would be, because MaxDate definitely exists and contains only numerical values. What is more strange is that if I try and combine the data through a pivot table it actually works! I can create a pivot with OrderID in the first
column and then associate it with MaxDate from the Submissions
table as the value.
Can anyone help me understand what is the problem here?
P.S. if it is useful the formula I'm using to calculate the MaxDate is:
=MAXX(FILTER(Submissions,Submissions[OrderID] = EARLIER(Submissions[OrderID])),[Date])
Thanks.Maracles, is this still an issue?
Thanks!
Ed Price, SQL Server Customer Program Manager (Blog,
Small Basic,
Wiki Ninjas,
Wiki)
Answer an interesting question?
Create a wiki article about it! -
Azure - The name 'model' does not exist in the current context
I am getting the error below but only on Azure, everything builds and runs fine on multiple machines running locally. But when I deploy to Azure I get the error below trying to login. Not even sure where to start researching this one
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'model' does not exist in the current context
Source Error:
Line 1: @model Web.Models.LoginViewModelhi,
From the error message, it seems like a MVC issue.
I suggest you could re-configure your web configuration follow those solutions The name 'model' does not exist in current context in MVC3
and
Razor View throwing “The name 'model' does not exist in the current context” .
And then you could try to deploy project to azure again. I think this error may be disappeared. Please try it.
Regards,
Will
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
The name 'InitializeControl' does not exist in the current context
Hi ,
i try to run my visual web part in vs2012,without adding any code to template i deploy web part into sharepoint2013.
but i got below error
The name 'InitializeControl' does not exist in the current context.how can i solve this error
Thanks,
Madhu.Here's my ASCX file that breaks the code generation:
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VisualWebPart1.ascx.cs" Inherits="Ensol.ViewAttachmentsWP2.VisualWebPart1.VisualWebPart1" %>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><a href="<%# Eval("FileUrl") %>"><%# Eval("FileName") %></a></td>
<td><asp:LinkButton ID="LinkButton1" runat="server" CommandArgument="<%# Eval("FileName") %>" OnClick="LinkButton1_Click">Delete</asp:LinkButton></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</ContentTemplate>
</asp:UpdatePanel>
No matter what I've tried to do with my webpart, the VS still generates an ASCX.G.CS file with no content at all. What I'm doing wrong? -
Error in script task "The name 'file' does not exist in the current context"
I am new to the c# scripting and SSIS come from PHP and Foxpro.
I am using SSIS with a script task and I am getting am errror "The name 'file' does not exist in the current context" in the following code in the picture below: (See
Why does the object named "file" go away after the first refrence to it?? How do I make it avaliable for the whole script??
public void Main()
String cFileInfo = null;
DateTime dFTPFileDateTime;
bool fireAgain = true;
List<IRemoteFileInfo> fileList = (List<IRemoteFileInfo>)Dts.Variables["SFTPResult"].Value;
foreach (IRemoteFileInfo file in fileList)
cFileInfo = file.Name + "|" +file.ModifiedTime +"|"+ file.Size;
Dts.Events.FireInformation(1, "Name ", cFileInfo, "", 0, ref fireAgain);
dFTPFileDateTime =
file.ModifiedTime;
<< This is where the error is occuring.
Dts.TaskResult = (int)ScriptResults.Success;I think you forgot { and } after the loop... Or is that deliberately?
Please mark the post as answered if it answers your question | My SSIS Blog:
http://microsoft-ssis.blogspot.com |
Twitter -
FL does not exist in current context
I am having a problem with my code. I have defined "state" as a global variable and the user needs to input one of 3 states. Based on the state chosen, I need to select a tax rate. I wrote an if statement to select the tax rate but, until the user
inputs the state, the variable isn't in the code. I am new at coding.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CIS115Wk7ILab
class Program
//Global variables
static String custName;
static String state;
static Double totalSales = 0, totalCost = 0, taxAmt = 0, itemPrice = 0;
static int itemsPurc = 0;
static void Main(string[] args)
//CIS115Wk7ILab
//Student Name: Frances J. Atwood
//Date: 04/19/2015
//Professor: Debbi McCloud
Console.WriteLine("Welcome to Atwood's Dry Goods Store");
readInput();
computeTotal();
computeTax();
Console.ReadLine();
public static void readInput()
Console.WriteLine("Please Enter the customer name");
custName = (Console.ReadLine());
Console.WriteLine("Please enter the State where your purchase is being made. Florida/New Jersey/New York");
state = (Console.ReadLine());
Console.WriteLine("Enter Item Price. Enter -1 to quit");
itemPrice = Convert.ToDouble(Console.ReadLine());
public static double computeTotal()
do
totalCost = totalCost + itemPrice;
itemsPurc++;
while (itemPrice!=-1);
return (totalCost);
public static double computeTax()
double taxRate = 0;
if (state == FL)
taxRate = .06;
else if (state == NJ)
taxRate = .07;
else
taxRate=.04;
taxAmt = (totalCost*taxRate);
Error 1 The name 'FL' does not exist in the current context C:\Users\Frances.Joshua-PC\documents\visual studio 2013\Projects\CIS115Wk7ILab\CIS115Wk7ILab\Program.cs 59 30
CIS115Wk7ILab
Error 2 The name 'NJ' does not exist in the current context C:\Users\Frances.Joshua-PC\documents\visual studio 2013\Projects\CIS115Wk7ILab\CIS115Wk7ILab\Program.cs 63 35
CIS115Wk7ILab@fjatwood,
As you defined state is a static String. But just FL is not a string. You should assign string to state.
So add double quotes to FL.
And the same as "NJ".
Best regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
CreateValuesFromQuerystring doest not exist in the current context
Hi All,
I am trying to integrate jqGrid in Sharepoint so i am following the below link
http://www.mindsharp.com/blog/page/8/
But getting an error like The name CreateValuesFromQuerystring does not exist in the current context..
please do the needful..Hi IWolbers,
>>I have a recurring problem where all of a sudden I can no longer see the values of my variables when I debug my unit tests. I cannot find a pattern as to when this happens but I experience this across one of every 20 tests that I write. Occasionally
this has also happened during normal debbuging of running code on my machine.
So you mean that it worked well before, am I right?
If you debug the same app in other VS machine, does it work well? So we could make sure that whether it is related to the VS IDE.
Please disable all add-ins in your VS IDE, and then reset your VS settings, debug it again.
https://msdn.microsoft.com/en-us/library/ms247075(v=vs.100).aspx
Or you could run your VS in safe mode, debug it again, at least, we could know that whether it is the add-in's issue.
https://msdn.microsoft.com/en-us/library/ms241278.aspx
To make sure that it is not the project files' issue, create a new blank solution, copy the project files to the new solution, clean and rebuild the solution, check the result.
>>Once I step over this to the next line (screen shot 2) I get the error message 'The name '[variable name]' does not exist in the current context'
How about debugging it with "Step Into" instead of "Step Over"? Or you could add breakpoints between 234 line to 241 line, after the breakpoint is hit, check the watch window again. How about the result?
In addition, do you check other debugger window like local or others?
Best Regards,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Get the current context of the site where web-part is added in the same site collection
Hi,
I'm creating a visual web-part in SharePoint 2013 using server object model (can't user COM as the code will run on the same server) to get all the members of "Members" group of the site/web wherever this web-part
will be added (in the same site-collection), so it will take the context of the site wherever it is added.
For Eg: I have a site collection "http://<Server_name>/sites/Finance" OR "http://<Server_name>/sites/Finance/Microsoft" OR some other subsite. I have used SPContext.Current property to get the current context
, but no success :( .
I tried in SPSite: SPContext.Current.Site ; new SPSite(SPContext.Current.Web.URL) and many other combinations with SPSite.
in SPWeb : site.openweb()
But I'm always getting the URL as "http://<Server_name>/" and not the context where the web-part is added in the same site collection.
Vipul JainHi Bjoern,
Thanks for the reply. I'm able to get the access of members group through API's. Just wanted to know about the context in SPSite & SPWeb. As you suggested , is there no need to use SPSite ?
using (SPWeb web = SPContext.Current.Web)
SPGroup membersGroup = web.Groups[web.Name + " Members"];
SPUserCollection lstMembers = web.Groups[web.Name + " Members"].Users;
foreach (SPUser member in lstMembers)
// add all the group users to the list
users.Add(member.Name);
It's not working
Vipul Jain -
Issue in the PDF at the time of Using current context element
Experts,
For retrieving the values in the WebDypro applications, I have used the current context element. Using that current context element I have generated the PDF.
I have faced critical issue, if the two different persons are accessing the same PDF button at a same time in the different system.
Both of them have selected the different values in the table (different id). But in the output it displays the same results (same id) for both the persons.
The PDF displays the correct results (different id) at different time interval for both the persons.
We are facing this issue, only if both the persons are clicking the PDF button at the same time.
Could you please anyone give the solution for this problem?
Application developed using WebDynpro Java NW2004
Kind Regards,
Hariprasath RHi,
First u invalidate() the current context element.
after that u put data in current context element.
Regards,
Sunaina Reddy T -
How to display current context while opening a todo entry from main menu
Hi,
I want to display the current context(account,sp details for customer) while opening a todo entry from main menu while searching through To do entry id.
Can any body guide me on this ?
Thanx.
SunilI am sorry that I didn't get back to all you guys that took to answering my very promptly. Unfortunately I was not in a position to answer to the suggestions made. as I was away from my computer which had Robohelp on.
Anyway, I did try a couple of scripts mentioned, but didn't really have any success i achieving what I need to do.
I set up a redirect which redirected to the main home page. I tried setting the home page in a main sub-project - so the redirect when from any sub project
Generate
Master-project.htm (Home Page = Help_Welcome.htm)
merged Projects
SubProject1
[Home Page = home_redirect.htm (a redirect see below) ]
SubProject 2
[Home Page = home_redirect.htm (a redirect see below) ]
SubProject 3
[Home Page = home_redirect.htm (a redirect see below) ]
home_redirect.htm (a redirect use by sub-topics)
<!--
window.location="../../ Help_Welcome.htm ";
//-->
//]]></script>
This setup works fine as long as I call the master page. The TOC is as I would want. However if I call an ID from my application I get the required page to display and I can get the TOC to show. The problem is that the TOC is from the current sub-project and not the master project as I would want. -
CDC in not started in the current context
Dear All,
I have performed all steps successfully for change data capture based on Mark Ritman article (http://www.oracle.com/technology/pub/articles/rittman-odi.html) with no errors. For some days everything worked fine but suddenly CDC stopped. The only message I see and I believe that something is going wrong, is when I am pressing ‘Journalizing’ on a certain table. The message is the following:
The table is included in CDC in consistent mode
CDC in not started in the current context.
The result is that no changes (journalized data) are produced!
Please note, that I am using the correct Context in main ODI interface (list box on the top of the screen). Could you please someone help me? It is very important to solve in ASAp since the system should be operate in production in a few days.
Regards,
George A. VerveniotisHello,
Could u plz tell me how u solved this problem? Im facing exactly the same.
Regards -
How to assign DOT ( current context ) to a variable ?
If i use XML dot (.) within Href , i am getting current context (http://servername/test)
Like this -->
<TD>
<xsl:element name="a">
<xsl:attribute name="href">./</xsl:attribute>
<xsl:value-of select="NAME" />
</xsl:element>
</TD>
But if i try to assign dot to a variable ,variable is not picking up the current context.
How can do this ?<xsl:variable name="a" select="."/>
Usually this is not necessary, since you can refer to the current context using the current() function. -
DAX - transfer current context down multiple computation levels
Dear,
I am highly struggling with DAX. I have a very complex query with 4 nested context levels (calculate inside calculate inside summarize inside....etc etc.) that computes a certain KPI based on a certain date.
The problem is that the query works fine via SSRS since I only need to pass one date which is explicitly passed with DATEVALUE(@parameter_name) whenever necessary.
Now I have a requirement to re-use that same logic but the input parameter now is the Year; which I must summarize and for every month compute that KPI based on the last day of the month.
The query below is a reproduction of the issue I am having in a simpler manner:
DEFINE
MEASURE 'Date'[Dt] =
COUNTROWS (
CALCULATETABLE (
ADDCOLUMNS (
SUMMARIZE ( 'Date', 'Date'[bk_calendar] ),
"SecondLevel", CALCULATE (
COUNTROWS ( 'Date' ),
FILTER (
ALL ( 'Date' ),
'Date'[BK_Calendar]
> EOMONTH (
DATEVALUE (
--The line below returns error: Calculation error in measure 'Date'[Dt]: A table of multiple values was supplied where a single value was expected.
VALUES ( 'Date'[Year] )
& VALUES ( 'Date'[MonthNumber] )
& "01"
0
--addcolumns
FILTER (
ALL ( 'Date' ),
'Date'[BK_Calendar]
<= EOMONTH (
DATEVALUE (
VALUES ( 'Date'[Year] ) & "-"
& VALUES ( 'Date'[MonthNumber] )
& "01"
0
EVALUATE
CALCULATETABLE (
ADDCOLUMNS (
SUMMARIZE ( 'Date', 'Date'[Year], 'Date'[MonthNumber] ),
"X", CALCULATE ( [Dt] )
'Date'[Year] = 2014
As you can see, at the line where I get an error, I am trying to find out how to pass the current end of month date according to the row context in the summarize... but I have no clue how to proceed, all I tried has failed me, and reworking the query or
following a different approach is a too much work (regression impact on the existing).
Can anybody assist on this ?
Thanks in advance for your time
Miloud B.Greg thanks again for your time.
Unfortunately this does not work either, it says:
Calculation error in measure 'Date'[Dt]: An argument of function 'DATE' has the wrong data type or the result is too large or too small
Which is disturbing :-)
In the meantime I have found a workaround, a heavy one but it is all i gor for now, I actually have an accounting period dimension for finance data that is not related to my fact I am using for this calculation, although I can cheat with it to pass the date
I want as shown below:
DEFINE
MEASURE 'Date'[Dt] =
COUNTROWS (
CALCULATETABLE (
ADDCOLUMNS (
SUMMARIZE (
AccountingPeriod,
AccountingPeriod[RealAccountingPeriod]
"SecondLevel", CALCULATE (
COUNTROWS ( 'Date' ),
FILTER (
KEEPFILTERS ( 'Date' ),
'Date'[BK_Calendar]
> EOMONTH (
DATEVALUE (
LEFT ( AccountingPeriod[RealAccountingPeriod], 4 ) & "-"
& RIGHT ( AccountingPeriod[RealAccountingPeriod], 2 )
& "01"
0
--addcolumns
FILTER (
ALL ( 'Date' ),
'Date'[BK_Calendar]
<= EOMONTH (
DATEVALUE (
VALUES ( 'Date'[Year] ) & "-"
& VALUES ( 'Date'[MonthNumber] )
& "01"
0
FILTER (
ALL ( AccountingPeriod ),
AccountingPeriod[AccountingPeriodYear]
= VALUES ( 'Date'[Year] )
&& AccountingPeriod[AccountingPeriodMonth]
= VALUES ( 'Date'[MonthNumber] )
EVALUATE
CALCULATETABLE (
ADDCOLUMNS (
SUMMARIZE ( 'Date', 'Date'[Year], 'Date'[MonthNumber] ),
"X", CALCULATE ( [Dt] )
'Date'[Year] = 2014
Thanks for your involvement anyway ;-)
Miloud -
How to obtain the Subject from the current context ?
Im working on a SSO project and everything is fine with getting the Principal from a HttpServletRequest object or from an EJBs SessionContext. But, I have some business logic that is not necessarily behind a SLSB (as a façade patter) and I dont want to propagate the Principal reference from Presentation to the Business Layer. Thats why, I would like too know if OC4J has some sort of utility to get the current authenticated Subject.
Thanks for your help
Miguel A. Onofre R.Hi,
is it possible to obtain the current ApplicationModule from an EntityImpl?No. But you can get to the root ApplicationModule that holds the DBTransaction object from
getDBTransaction().getRootApplicationModule() - new in JDev 903. -
Error: The name 'HttpUtility' does not exist in the current context
G'day,
My attempt to complete tutorial 'How to create a basic RSS reader for Windows Phone' (http://goo.gl/pLBHaL) has been unsuccessful, with the above-mentioned error generated on F5.
I have successfully installed, after some hiccups, OData Client Tools for Windows Phone Apps.
Any pointers would be appreciated.
Best,
GauravAnd for Windows Phone 8.1 you should use WebUtility rather than HttpUtility:
// Remove encoded HTML characters.
fixedString = WebUtility.HtmlDecode(fixedString);
Maybe you are looking for
-
How do I delete an Apple iD from my iPhone?
i used to share an iTunes account with my Dad, until recently. I got my own Apple iD. Everything has been working relatively well except for one thing. When I try to update apps, it still asks me for my Dad's iTunes password, instead of mine. I alrea
-
How to emabed BI Publisher report to a different application using GO URL
Hi all, How to emabed BI Publisher report to a different application using GO URL. I put the BI Publisher report in dashboard and create a go url but the problem is it is showing top header and all dashboard names present in my dashboard. I want to s
-
Can I rip the audio from a video so that's all i have?
I have a couple of comedy videos and i find it unecessary to have the video and the audio, since it would be just as great with only the audio. So my question is if anyone knows if i can rip only the audio froma quicktime movie? thanks in advance.
-
Intermittent problem. My digitizing sometimes stops with the message "Tape trouble. Check VTR. Do not attempt to eject tape or use transport without checking VTR first." If I hit continue it may then capture the same clip fine.
-
Text is broken in two pages is sap script
hi all, the text is broken in two pages is sap script also total is also breaking. how to fix the problem? sanjay