I am trying to display the server name of my server in commented region.
I can display the server name however, we are not allowed to display the whole server name.
i am using following code to display the server name that can be read in page source view..
<!--<%=Environment.MachineName%>-->
It displays the whole machinename, is there a way i can display just the last 4 digits of the server name....
as machinename is an ordinary string, this one should solve your problem
<%=Environment.MachineName.Length > 4 ?
Environment.MachineName.Substring(Environment.MachineName.Length-4,4) :
Environment.MachineName %>
This is what I used
<!--<%=Environment.MachineName.Substring(Environment.MachineName.Length-4)%>--> It works the way I want
Related
I'm designing a workflow in SharePoint designer that uses a HTTP web service step via GET method. I have used it successfully before but this time I think the issue is with the name of the list but I'm not sure how to fix it.
Now the original name of the list "Engineers' Items-Table". As you can see, there's an apostrophe in the name. So initially I tried the following url which returned 0 records:
https://<domain>/_api/web/lists/getbytitle('Engineers' Items-Table')/items/?$select=Id
Then I renamed the list to "Engineer Items-Table" and tried the url:
https://<domain>/_api/web/lists/getbytitle('Engineer Items-Table')/items/?$select=Id
which doesn't return any results either. I tried using escape character %27 instead of the apostrophe which is not working either. SharePoint doesn't throw any exception. Workflow completes without an issue but without returning any items from the list.
Really appreciate your input. Thanks.
Instead of using "%27" use " ' " as escape character.
https://<domain>/_api/web/lists/getbytitle('Engineers'' Items-Table')/items/?$select=Id
Renaming the list might not change the behaviour because what you'll be changing now will be only the display name.
Next keep the query simple remove select as a start once you start getting result add select and filters.
Use POSTMAN which is a Chrome extension helps you find the error quickly.
I have a URL with an output that needs to be reformatted and entered back in the browser.
We have a server that passes caller ID and we can specify a URL to launch with the caller ID included.
IE: googledotcom/search?="{callerID}" . If this is set in the URL manager it would return a google search for "Jackson Steve" when a call is received from Steve Jackson.
**edit: the tag {callerID} that is passed from our server can not be edited in any way because of Asterisk dial plan issues.
This issue is our customer database will only handle name searches in the format of "Jackson, Steve". Without the comma the search comes back empty.
How would I take the name passed from caller ID, create a script to insert a comma and resubmit that URL in the browser?
Basically I need a way to convert "https://www.google.com/#q=name+name" to "https://www.google.com/#q=name,+name" via an automatic script or process. The comma coming after the first name being the change that needs made.
Should this be sent to a website running javascript/html where it formats the caller id name then resubmits or should this somehow be handled by a local script on a computer with something along the lines of autohotkey?
Possibly use some sort of redirect on a web page? send "Name Name" to mywebsiteDOTcom/urlformat/, write a script that would insert a comma in after the first name and redirect the user to myuserdatabaseDOTcom/search?"Name, Name"
Replace the spaces with comma, that should be the easiest solution..
Using Firefox, you could write a Greasemonkey script that is automatically run when you hit the target site (Chrome, I believe has a similar addon named Tampermonkey, not sure about IE). In the javascript, you could examine the URL and either do a straight comma-for-space replacement as Danyal suggested or you could do something a little more elegant with some regex matching, then auto-navigate the browser to the corrected URL. Once the script was installed, this process would happen automatically.
PS. What process launches the browser? Can't you capture the name and the format it before you launch the browser window? That would seem a much better approach than trying to format it after the fact.
There is a strange behavior with my WSS3. I have list with a couple of elements which have a dash in their name, for instance XXX-111 or YYY-22. If I search for this elements on my computer it correctly returns the element. However if I make the same search on another computer (with the same SharePoint account of course) the result is empty. What is going on? Am I missing something? Thanks.
Maybe your web front ends are out of sync.
RDP to each of your front ends, and place a JPG in the 12 hive. The picture should be the number of the web front end respectively.
In the list/document library's dispform.aspx file, use SPD to reference the JPG from the 12 hive using an HTML tag. When you view the page, it will show you what web front end you're looking at.
This way you can see which web front end has the syncing problem. If...that's the problem.
The UpdateRecord.js, to be found on Windows 7 at ..ProgramFiles(x86(/Adobe Dreamweaver CS5.5/configuration/ServerBehaviors/Php_MySQL/UpdateRecord.js causes an error when it is selected from the SERVER BEHAVIORS menu. This happens BEFORE you I enter anything into the fields.
The error states: "While executing onLoad in UpdateRecord.htm, the following JavaScript error(s) occured: At line 687 of file "........UpdateRecord.js": name has no properties. I've looked at the code and it is beyond my comprehension. Something about the NAME of a value in the node list.... I just don't have the chops to go rewriting Adobe's code. Does anybody know what to do about this?
About my system: Windows 7, 64bit, CS5.5 (on a lease so it is up to date) using PHP and MySQL, on a remote dedicated server running Apache on Linux. :<)McFrisco
Based on my experience, maybe there's input has blank name or without name.
a quick temporary solution is close or change the Server Behavior tab in the DreamWeaver.
you will not see that message until you reopen or reuse the Server Behavior tab group.
Specify the type.
Error will occurs ---> input name="privilages" id="privilages" value=""
Change to ---> input type="text" name="privilages" id="privilages" value=""
Please check the type of all Text boxs, Radio Buttons, Select Boxs, ect... in your form.
I fixed this quickly when I realised that one of the fields in the form had the name missing! Added a name and the Update Record behaviour worked normally.
I got one problem. I called one image from server. example: "www.sample.com/images/image1.jpg"
But if someone changed the name to uppercase like IMAGE1.jpg. Flex doesn't display image.
solution plz?
One solution is to use a web server that does not requre case sensitive paths, like Microsoft's Internet Information Services.
Another option is to limit access to your server so that people cannot change the names of files.
If you've got only two possible spelling for each name ("image1.jpg" and "IMAGE1.jpg") you can apply a dirty hack. Listen to Image's error events (ioError and securityError) and after one fail try to load image by another path.