I have a Survey list which has several questions, one of those is people picker field and the another one is single line of text field.
I need to hide a perticular question ( field ) based on login user. Requirement is as below
When the user logs in as admin
a. Display ‘people picker’ and should not allow user to pick his name from people picker.
b. Hide Single line of Text field.
When the user logs in as ‘Non-Admin’
a. Display ‘Single line of Text' field and default it to have the logged in user name (without domain name).
b. Hide ‘People picker’ control.
I am thinking that we can do it by placing javascript in content editor webpart and add it in newform.apx of survey list. Can anybody give me the proper approach to get it done?
Thanks in advance
You might like to try creating a custom field control, a differnet one for each field.
Javascript is fast and involves minimal deployment, but is fiddly and can be turned off.
Related
Hi SharePoint masters!
I would like to customize the popup that shows when users click to check in a document. Currently it only shows a text field, where users add a comment. I would like to add other fields such as time spent working on this document, and other attributes, and store all of them in a SharePoint list to log all the time spent.
Is this possible? i.e. when users choose to check in a document, I show a custom form instead of the default form that only asks for a comment.
Thank you,
BoNDoK
I'm trying to create an powerapps app for audits. These audits have multiple questions and I want to create a screen where the user can awnser multiple questions in 1 screen. But all questions have to be linked to the audit. So if a question is already filled in it will display the awnser and is able to edit this if needed.
Every question needs to get a grade (1-10) and a description of the awnser.
I already have a detail screen for the audit itself with the base information. idealy i want a button that can go to the questions and fill them in. I'm using multiple sharepoint databases to store the information. So i would like to store the awnsers here as wel. For the awnsers i made a seperate database linked to the audit and the question.
I also have a database for the information of the audit and one for all the questions.
So my question is how do filter a gallery based on the audittitle? and also how do i save this information easily in the sharepoint envoirment
Screenshots could have clarified the problem in a better way, but as much as I could understand from the problem subject, here is a solution to "how-to-filter-a-powerapps-gallery-based-on-previous-screen" :
When you have lots of fields in previous screen which is required for filtering.
You can store the values on previous screen either in a sharepoint list (by submitting the forms from previous screen ) and then fetching them to filter content ( by having a gallery inside a gallery)
OR
When you have less number of fields.
You can simply store the values in variables by using Set(a,box1.text) ((where a is the variable name and box1 is the input box) function on navigation to new page ( by putting this in Onselect menu) and then using it in the filter command.
Here is the steps to filter a gallery from the value coming from previous page.
put a button on the screen from where you want the value
on select property of the button put this code
Navigate(screenName,screenTransition,{variableName:valueToFilter})
Now on the Items property of Gallery put below code
Filter(datasource,columnToFilter = variableName)
Note that this variableName should be the same as above.
This will filter out your data in gallery.
For your 2nd question:
Create a list in Sharepoint which will have all the questions/fields.
Connect this list to your PowerApps app
insert a form on a screen.
add your Sharepoint list as a data source to the form
insert the button on the same page as form
onSelect property of button put this code
SubmitForm(formName)
I have a custom list with the following fields:
Title: Single line of text
Description: Multiple lines of text
Remarks: Multiple lines of text
Recipient: Person or Group
Whenever I input two or more people in the Recipient field, in View Item page (Display form), contents of Description and Remarks becomes blank/empty.
Contents are displayed okay on the main view of custom list, and in EDIT mode.
If I input a single person only in the Recipient field, the contents for Description and Remarks are displayed in Display form.
Note: Recipient field is set to accept multiple values. I'm using Sharepoint 2013.
I am new to Sharepoint and I'd like to know a way on how to troubleshoot/debug this matter. Or are the multi-line fields somehow connected to the person field? Or any setting that I need to setup? How can I check?
I tried to search but I found no same situation as far.
If there is no customization in Display form, it should work fine. If it works for Single User in Recipient, It should work for multiple users too.
For further troubleshooting, You can create a test list and create same type of columns in it. Then see if the Display form works fine in that test list. It will let you know if the issue is related to the specific list or it's generic. You can then narrow down your troubleshooting options based on this result.
There is text filed in which "Author" name saved while submitting new form but while editing that form is there any way by which I can make it People picker and user can select the new name name and save the changes.
Unfortunately Naveen's answer's will not work for you.
The Client People Picker does not apply to SharePoint 2013 on-premise, except when writing a custom AddIn which you are not doing.
You also can't change the existing Text field of Author to be a people field directly as that is an illegal/invalid field type modification.
You will need to edit your existing field and rename it to something like AuthorOld/AuthorText. And then create a new field as a person field named Author.
However, it sounds like you're trying to let the user edit the field for who created the item. That field is locked for editing by end users. You can however, hide that field and just create a new person field with a default value of [Me] (this fills in the current users name when they create an item). Which will let you get the behavior it sounds like you're after :)
What my understanding is in SP Default edit form you have a Text Field to Save the User Value. Now you need to make that Text field as PeoplePicker Control.
You have 2 choice to done this.
1) Go with OOB. Make that Text field which is used to save the "Author" name as User Field. So it will be act as a PeoplePicker control in Both New/Edit Form.
2) Add Content Editor Webpart in the Edit Form. And make that Text Field as Client people picker.
Refer for
Client People Picker
Mark as answer if it helps.
I am new to sharepoint 2007. I have a following requirement.
1) I would to create a custom list for employee where they can select the item and fill-out the form and submit.
Example : List --> Hard Disk --> Click --> Create new list -->
List has following fields 1) EmpID 2) Customer name (Text) , 3) Order Date, 4) Qty 5) Price
Once user submit the list then I would like to disable the EMPID field and allow same user to edit the other fields if required.
How can I disable the text field (Empid) in the Sharepoint 2007 ? I would appreciate any other alternate or better idea.
Thanks,
Regards
Vick
I would use jQuery for this purpose. Here is an example that describes how to hide a text field on a SharePoint form. Change the .hide() to .attr('disabled','disabled') and this will disable the text field.
If you need help with deploying jQuery, see this question.
I am not sure its a better idea or not, but for that i used to do for this common scenario
that
fist identify the textbox id in html source (through web browser view source) after that i wrote javascript function to disable textboxes i.e. EMPID or we can do through style sheet and apply style using javascript..
You can create multiple content types for the same list. Have the user fill out the content type that contains the EmpID field (put a link in the LeftNav that sends them to NewItem.aspx with the proper ContentTypeId). Make the default content type the one without the EmpID, so when they go back in and edit they won't see that EmpID field.
The downside to this is that they'll see both content types in the New button dropdown. You can name them in a way that makes sense (New Hard Disk Order, Edit Hard Disk Order)