SharePoint MS Access 2013 Web App – How to find the connection string to the sql azure database


I have added an app to from sharepoint store to my sharepoint online.When i login in i can’t see the customize in access gear link to get me to the access database.

Question

1) How can i get the connection string to the database in sql azure

2) How can i open the sharepoint web app in access 2013
Thanks i advance

Check DateRange free Date and time in Calender


I am trying to see if there is already in the calender we say from
2014-11-28 10:00 to 2011-11-29 10:00 an event then displays 5 days before startdate and 5 day after EndDate, display to the user the available Event that are free to book.

function checkFreebookingdateTime() {
try {

    var listItemCustom = document.getElementById('datepicker').value;
    var listItemFromTime = document.getElementById('timepicker').value;
    var listItemtoDate = document.getElementById('datepickerto').value;
    var listItemToTime = document.getElementById('timepickerTo').value;
    var result = listItemCustom + "T" + listItemFromTime + ":00" + "Z";
    var result2 = listItemtoDate + "T" + listItemToTime + ":00" + "Z";
    var fromTime = new Date(result);
    var toTime = new Date(result2);



    getListCalender = document.getElementById('CalenderListDrop').value;
    spHostUrl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
    context = new SP.ClientContext.get_current();
    parentContext = new SP.AppContextSite(context, spHostUrl);
    web = parentContext.get_web();
    list = web.get_lists().getByTitle(getListCalender);
    context.load(list);
    context.executeQueryAsync(
        function() {

            var camlQuery = new SP.CamlQuery();
            camlQuery.set_viewXml('<View><Query><Where><And><Ge><FieldRef Name='EventDate' /><Value IncludeTimeValue='TRUE' Type='DateTime'>'
                + fromTime.toISOString() + '</Value></Ge><Ge><FieldRef Name='EndDate' /><Value IncludeTimeValue='TRUE' Type='DateTime'>' + toTime.toISOString() +
                '</Value></Ge></And></Where></Query></View>');


            this.collListItem = list.getItems(camlQuery);
            context.load(collListItem);


        },
        function() {

            if (collListItem.count > 0) {

            }


        }
    );

} catch (e) {
    alert("");
}

}

Unable to set collListItem or nullreference


Here i am trying to get the items from the dates between 8-17 on the date 12-04
Here i am trying to get the items from the dates between 8-17 on the date 12-04

The result works fine,

enter image description here

I am trying to do the same using an

SharePoint-Hosted app,

Here is my code, it takes the date that the user has entered and adds the the time to ISOString() but i get the error

Unable to set collListItem or nullreference

enter image description here

Get all items from list


How do i get all items from list?
Here is my code,

function checkFreebookingdateTime() {

getListCalender = document.getElementById('CalenderListDrop').value;
spHostUrl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
context = new SP.ClientContext.get_current();
parentContext = new SP.AppContextSite(context, spHostUrl);
web = parentContext.get_web();
list = web.get_lists().getByTitle(getListCalender);
context.load(list);

var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml('<View><RowLimit>1000</RowLimit></View>');
collListItem = list.getItems(camlQuery);

context.load(collListItem);

context.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));

}

function onQuerySucceeded() {

var listItemEnumerator = collListItem.getEnumerator();
while (listItemEnumerator.moveNext()) {
    var oListItem = listItemEnumerator.get_current();
    var listDetails = oListItem.get_item('EventDate') + "  " + oListItem.get_item('EndDate');

    alert(listDetails.toString());

 }
}

function onQueryFailed(sender, args) {
 alert('Request failed. ' + args.get_message() + 'n' + args.get_stackTrace());
}

I get this error,

TypeError, Unable to set property collListItem or undefined or null
reference

How to get SPFieldChoice values using rest api SharePoint 2013?


I have a choice field in my list. I can get it values using server object model by following way

List<string> fieldList;

SPList spList = spWeb.Lists[listName];

SPFieldChoice field = (SPFieldChoice)spList.Fields[fieldName];

fieldList = new List<string>();

foreach (string str in field.Choices){

             fieldList.Add(str);
         }

Now I need it badly using rest api. Is it possible using rest api?

How chould i get title where “Title characters contains input box then get the values”


i am trying to get the title if it contains the characters in an input box
So first if the user types ABC, then get the titles that contains A,B or C

 $("#subSiteTitle").keypress(function () {
    var checkTextTypedIn = $('#subSiteTitle').val();

            hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
            appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));
            var scriptbase = hostweburl + "/_layouts/15/";
            $.getScript(scriptbase + "SP.RequestExecutor.js", execCrossDomainRequest);
            function execCrossDomainRequest() {
                var executor = new SP.RequestExecutor(appweburl);
                var queryUrl = appweburl + "/_api/SP.AppContextSite(@target)/web/webs?$select=Title,Url,WebTemplate&$filter=WebTemplate ne 'APP'&$where=Title.Contains=checkTextTypedIn&@target='" + hostweburl + "'";

                executor.executeAsync(
                     {
                         url: queryUrl,
                         method: "GET",
                         headers: { "Accept": "application/json; odata=verbose" },
                         success: successHandler,
                         error: errorHandler
                     }
                         );
            }
});

This is my input box var checkTextTypedIn = $('#subSiteTitle').val();

Here is am trying to se if title contains $where=Title.Contains=checkTextTypedIn
its not working right now because i dont now how to write the where statement?
Can someone maybe help me ?

After I create a Office 365 app hosted in Azure. How do I add it to MY APPS so everyone inthe company sees them ?


I am a dev and the company got Office 365 recently so we want to move the web apps to be inside Office 365. At first I thought I would make APP PARTS inside some pages but I think it is more direct just to give them their own page. So on this topic I want them to be able to access the app from the MY APPS menu. Can someone point me to some details regarding this ?

(This seems obvious but I could not find an answer after searing for awhile)

Unable to authorize SharePoint 2013 app unless Team Site Owner


I’ve built a SharePoint 2013 app that requests permissions on the fly via OAuth. The scope being requested is Web.Write. I’ve been able to authorize this app as a SharePoint user part of the Team Site Owners group since that group gives the user Full Control. However, I receive an access_denied error code in the redirect if I’m a “normal” user part of Team Site Members.

I gradually added increasing levels of permissions for the user and it appears that in addition to the Edit permission granted to the user by virtue of being in Team Site Members, the user also requires “Manage Permissions”, “Create Subsites” and “Manage Web Site”, which doesn’t make much sense to me. Even the scope List.Read requires this level of permissions to complete the OAuth flow.

Is there a workaround possible that allows normal SharePoint users to grant access to data they can edit without having to get their admin involved?

For example, here is a screenshot of the page when requesting Web.Write scope and the ‘Create Subsites’ permission isn’t provided to the user:

SP 2013 OAuth

(The actual domain has been replaced with “example.com”)

Sharepoint provider hosted app with Azure hosting


Currently I am working with Sharepoint provider hosted app. My app is working fine but when add remote event receiver, I can not able to debug it. And also not able to get context.

I referred these links: http://msdn.microsoft.com/en-us/library/office/fp142381(v=office.15).aspx

http://msdn.microsoft.com/en-us/library/office/jj220043(v=office.15).aspx

http://msdn.microsoft.com/en-us/library/office/dn275975(v=office.15).aspx

I am using Azure for web application hosting. My app is working properly by “Start” from visual studio, but getting error in Output:

Cannot register Services/AppEventReceiver.svc on Windows Azure Service
Bus: The remote server returned an error: (500) Internal Server Error.
just getting this error

But app is getting installed successfully each time.

Easy way to change the Back to Site link on a Sharepoint 2013 app


I have the client side chrome control in my SharePoint 2013 app which includes the standard “Back to Site” link which get populated by the SPHostUrl ( i think by the sp.ui.controls.js file)

I need to change this link to goto another site collection entirely or at least goto where the app was launched from.

Is this possible?

Question and Answer is proudly powered by WordPress.
Theme "The Fundamentals of Graphic Design" by Arjuna
Icons by FamFamFam