Can I use SQL in Script editor inSharepoint ( webpart)? - sql

I am working on Sharepoint site that already exists and I need to create a new webpart dedicated for a certain form to complete, then I should use the answers collected from the form to produce a "result page". When I open the "Edit source" Or "Embeded code", I can easily use html or javascript to display whatever I want, my question is: In that script editor(snippet) can I use Sql as well?
As I said, I'm going to need some sql queries to extract the answers from the form.
Thank you in advance.

As far as I know, that is not possible.
If what you are doing is something like storing a form submission in a list and then displaying the result in a different page:
Create a form - using normal HTML/JS etc.
On submit button click - store the information in the list
Retrieve the information from the list using the ID(or any other criteria) on the results page and display it (again using HTML/JS)
Have a look at this JS library, which has SQL like syntax, for working within SharePoint:
https://aymkdn.github.io/SharepointPlus/

Related

Repopulating an already populated dropdown list in SSRS report

I need assistance with something which I have not been able to find through searching this site or even via Google.
I currently have an SSRS report which has a dropdown list that is immediately populated upon loading of the page.
Due to the extensiveness of this list, I have been asked to add another paramater to the report - a text box that would allow the user input and further "filter" the already-populated dropdown list.
By adding this feature, it would allow the user to narrow the contents of the dropdown list, if the user already knows what value he/she is after.
Now this is where I'm getting stuck... as far as I am aware, you can only have one dataset that is able to provide the data of any given paramater (in this case, a dropdown list). So how do you repopulate a dropdown list, that has already been populated?
Any assistance with this would be greatly appreciated.
EDIT: Please note that the only code driving this report are SQL stored procedures. This report was created using Visual Studio 2013.
Thanks.
Use a second dataset in order to populate your dropdown. In the second dataset, simply take your sql query and select distinct in a group, then you can use the second dataset as the dropdown and tie it to your column that matches.

Data entry form in sharepoint

I was wondering if anyone knows what a simplest way to create a data entry form in Sharepoint 2010 Foundation would be. Basicly I am looking to create a form that will submit its data to a custom list on the site, I don't want the users to interact with the list directly but use the form to enter data instead.
Also I can't use Designer or InfoPath, not being able to use these is what is causing the problem it seems. Just curious if anyone else has done something like this or could point me in the right direction.
Thanks
Every list is born with forms by default - one for item creation, one for edition and one for displaying. If you use content types, then you get a trio of these for each different type.
You never interact with the list directly, you do it through these forms. If you can't use either Infopath nor Sharepoint Designer, you can still edit them by clicking on the Page tab, then the Edit Page button. From there you can add or remove web parts, and connect them among themselves.
However, the amount of control you have is too limited when compared to editing pages through either of the tools or mentioned, or Visual Studio. For example, there is no straightforward way to add or remove list fields based on content type. Be prepared for ever increasing frustration if you can't use those tools.

Can Python be used to read the webpage grid kind of data?

I am currently working on a third party applications.Now there are some webpages where data are in Grid. So is it possible to read such grid contents from the webpage and stored it into the excel sheet?
Thanks
You don't need to do any programming. Excel has the ability to retreive data directly from HTML tables.
http://office.microsoft.com/en-gb/excel-help/create-edit-and-manage-connections-to-external-data-HA010167227.aspx
In short:
Go to The data tab
Click "from web"
Navigate to your page
Select the table of interest.
You can then refresh it by refreshing the data connection.
If you want to scrape it yourself then you can do it with all the tags you have used in your question. Just learn all those things and the answer will then be obvious.

ECT External Content Type (using Infopath External Item Picker) with List

I would like to create a list with some External Data fields (and other fields) and customize it in Infopath, but it's not working.. InfoPath says:
The following fields in the SharepPoint list are not supported because
of their data type and will not be available in InfoPath Designer:
-field_1 (BusinessData)
-field_2 (BusinessData)
Is it possible to use an External Content Type (WCF Service) with a list in Infopath?
I mean, use an External Item Picker in a Infopath form that connects to a list. Or is it only possible with a Form Library?
Any ideas on how to solve this or a suggestion to another approach?
Thanks in advance.
It is possible to create the scenario you're referring to... if I understand you correctly, you want to use the External Item Picker to create a pick list within an external list against another list.
You would have to associate the two external lists (ECTs) within your BCS model. This association must be a foreign key based association. That done, SharePoint will automatically create an External Item Picker in the default list form.
I'm currently doing the same thing and it works for me in Sharepoint. However, when I modify the form in Infopath, I start to get errors whenever I select an item in the External Item Picker. As long as I don't use InfoPath to modify the form, it works fine in SharePoint.
I hope this answers your question.
Cheers!

Insert javascript code in a list form.

I have a list, and want to insert custom javascript code in a new form for this list (when form loaded). For example, when new form for this list is opened, I want to make some layout modifications for this form.
How it can be done? And how many ways exist to achieve this?
Thanks.
Upd: I ask about SharePoint list, and SharePoint list forms, I suppose you look at the tags of the question :).
You put tags for both SharePoint 2007 and 2010 and the methods are a bit different.
I agree with the previous post that with SP2010 you can simply use InfoPath designer for form design and do whatever you like to the look.
In SharePoint 2007, there are a couple ways incuding using SharePoint Designer, editing the form .aspx file, hiding the out of the box form and inserting a custom form which you will then be able to edit. You can also add in JavaScript code there as well.
My preferred method if you are just making some visual modifications is always JQuery which you can add in to a content editor and you can look for the particular tags surrounding rows or columns and attach to them and make your changes.
I think your question and tags need further clarification to get an articulate answer from anyone that will actually help you.
You can edit the layout using InfoPath 2010 like described here:
http://office.microsoft.com/en-us/sharepoint-designer-help/edit-list-forms-using-infopath-2010-in-sharepoint-designer-HA101631624.aspx
If you've got the SP2010 Foundation or SP2007 version, you can create custom list forms using SP Designer which gives you the option to do whatever you like since those are .aspx files.
http://office.microsoft.com/en-us/sharepoint-designer-help/create-a-custom-list-form-HA010119111.aspx
You can also edit the aspx List form in SP designer. To add Javascript or jQuery you should create a form for New in PS design then edit in Advanced mode to insert your Javascript in the proper place. There are many tutorials on the Web that talk about this... Also, you can add content editor webparts to the new aspx page where you can insert your Javascript or jQuery.