SharePoint 2016 - InfoPath - Questions - sharepoint

I need to add javascript to a specific infopath form in the list. There are multiple infopath forms in other lists on the same subsite. I found an option to add javascript to FormServer.aspx, but this option also affects additional infopath forms.
Questions to which I cannot find the answer:
Is there a way to achieve the addition of javascript for a specific
infopath form so that it does not affect other infopath forms?
Is it possible to use multiple layouts (like FormServer.aspx) so that
I can define which layout should be used on a specific infopath form?
Is it possible to add a unique id for the field (input, button) when
creating the infopath form?
Is there any possibility?

Related

Handle click count for documents in SharePoint 2010

I am having a page with documents loaded in SharePoint 2010. I have three buttons below each documents in the page and they are 'Like','Unlike' and 'Comment'. So whenever people go there and see the documents they can click on any buttons of their wish.
My question is how to take the hit count of these buttons seperately and display it for each document. Is it possible to create a list with having these three columns and handle it using Client-Side scripting. Any suggestions or help is much appreciated.
Each item in SharePoint has a property bag that can contain ad-hoc data like this. You could certainly add additional columns to store this data and update those columns but that does mean that users could easily manipulate the values via the UI. Since the property bag is only accessible via the various API's, you wouldn't have this issue.
For an example of accessing the property bag via CSOM (which would be your best option since I'm assuming you want your users to be able to like, unlike and comment without refreshing the page each time), see this post reading and writing property bag values using CSOM
Another thing to consider for comments is the existing notes functionality that exists in SharePoint 2010 and SharePoint 2013. These comments are ties into the social functionality and may give you a bit more bang for your buck. To show the comments page for a particular list item see this post SharePoint Social Data using Javascript

Taxonomy picker control

In my SharePoint 2010 web part I want to display the control which allows to select the term - it is the same control that is being used when you have metadata column in your list and try to add new item, or when you use SharePoint 2010 tagging to tag the page it displays the control where you start to type the term name and it auto suggests you available terms.
Please, note, i am not asking about TaxonomyFieldEditor control, which the the big control for creating new term stores,etc, i just want the picker, which is used in lists and tagging.
Is that possible to add to my web part? If yes, then how?
Many Thanks

Can SharePoint be used to maintain employee forms?

We'd like to create something within SharePoint that would allow to ensure a set of forms is completed for each employee (i.e., Tax forms, non-compete, etc.). HR staff would have access to a page listing employees and upon selecting a specific employee, they would be shown a list of these completed forms which could be opened to view the document.
Is this scenario something that can be done fairly easy with out of the box features? Or would a custom workflow, web part, or something else be the best bet?
The easiest way to do it out of the box would be to use a single Document Library (or possibly Forms Library) that has multiple document/form templates in it. Then create a View that groups by Created By. HR could then expand on an Employee and see what has been filled out.
To limit an Employee from seeing the forms of another Employee, set the View and Edit options to Only Their Own. Make sure that HR has a higher level of permissions for the list and/or site in order to see all Employees.
If you don't have complex workflows - my advice will be to populate SharePoint List using InfoPath Forms (this article will be a good start).
In other case solution heavily depends on your business requirements and may vary from simple SP List to custom workflows with infopath forms and custom webparts.

Sharepoint Announcements List

Is it possible to create a announcements list so that when there is no announcements, it will display a "default" announcement ?
Another non-JavaScript approach would be to use SharePoint Designer to convert the view into a DataViewWebPart. The menuing options available in the DVWP gives an option to display text when there are no items available to display.

how to upload multiple infopath forms in single document library in sharepoint?

I have 5 different infopath forms.on sharepoint site , i want to upload them in single document library. But when i am going to do this it is overwriting existing form. What i have to do. Is that possible to upload all 5 forms in single Document library ? I do not want to create 5 different Document libraries for 5 forms . please guide....
The only way to do it would be to rename the each form and use unique name. Uploading the form with same name would result in overwriting the existing one.
In case you are submitting form directly from InfoPath then you need to change your Main Submit method. It allows you to define a name form will get as submitted. Combine it with something unique e.g. today() or something similar.
If while publishing it is overwriting then you can publish the form as a Content Type.

Resources