Unable to save new record to the sharepoint list - sharepoint-online

I am creating a leave system for my company through Sharepoint. I tried customizing the edit form using powerapps. So when I fill all the records in edit form as shown in powerapp.png, and click on save button as in normal sharepoint form, my fields get reset to their defaults and i get 'entry required or invalid value'(see the attachment named 'powerapp.png') and the item isn't added to my sharepoint list.
However the record does get added to list if using normal sharepoint form as shown in normal_sharepoint.png.
Note: I have created a custom text field in powerapp.png which calculates me the leave days excluding weekdays and weekends. ( this is a major requirement)
Also I have enabled content-approval in my sharepoint list because the item is sent to manager for approval. Hence a content-type data field equal to 'Item' always shows up when I open the edit form in normal sharepoint and some unique id is autogenerated. However I enabled the content type field in powerapps too but still the same error.
powerapp.png
normal_sharepoint.png

You need to ensure you have filled out all the fields as those asterisked are Required fields.
Also on the datacard of each of the fields on powerapps, you can change the required property to false if any of the fields is not cumpolsory

Related

Powerapps how submit a form with a reference to another sharepoint list?

I am working on a small COVID screening app. I have 2 lists in a single Sharepoint site:
BasicInfo:
ID (autogenerated by Sharepoint)
Name
Company
PersonalInfo:
BasicInfoID (a Lookup field to BasicInfo.ID)
Personal Phone
Personal Address
Company Phone
Company Address
All fields in both lists are required.
Creating the Powerapp, the BasicInfo form works as expected - records are populated in the Sharepoint list, and I can access the ID generated with BasicInfo.LastSubmit.ID after submission.
On the second screen of the app, I am having a hard time getting the "BasicInfoID" field populated. I am expecting to be able to set the value of BasicInfoID on the 2nd screen, then hide it, so the end user doesn't need to see (or populate) the value.
I have tried:
Setting the default value to BasicInfo.LastSubmit.ID, but I get an error of "Expected Record Value. The property on this control expects Record values. The rule produces Number values which are incompatible."
If I set the default value to BasicInfo.LastSubmit (no .ID), the form oddly submit - but the resulting data in the Sharepoint list doesn't show any value in the "BasicInfoID" field - it lists it as Required Info.
If I remove the automatically generated BasicInfoID field, I obviously get an error of "BasicInfoID: Field "BasicInfoID" is required."
I have added a Text field, assigned the DataField value to "BasicInfoID", set the default value to BasicInfo.LastSubmit.ID, but the form fails with the same error (BasicInfoID: Field "BasicInfoID" is required).
Thanks in advance!
When you do a LookUp from one SPO list (1) to another (2), the schema of the field in the list 1 is the same as the one returned by the Choices function. So in your scenario you can use this expression:
BasicInfoID: LookUp(Choices(BasicInfo, Id = BasicInfo.LastSubmit.ID))
The post at https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/ has some more detailed information about using complex columns in SharePoint (such as LookUp ones).
Hope this helps.

SharePoint send notification Email After Assigning

I created in SharePoint a list. with column Assigned To. What I want is that an email is sent to the Assignee, if the Assignee is added to this column. But the problem is that Workflow is started only automatically if any changes are made in an element or when an element is created.
So my question is, is there a possibility to trigger an email by content changes in a specified column without sending 2 emails.
I think, If you are using SharePoint 2010 or 2013 workflow then you can set workflow to triger only for create and edit of item of list. But If you use Microsoft flow, you can trigger flow base on column change. But if you want to implement into 2010 and 2013 workflow then below step will work.
1) create one extra field and make it read only and hidden for every one.
2) trigger the workflow when item change into list.
3) if Assigned field is not null and not equal to extra field then send email and make extra field value same as Assigned field value.

InfoPath won't let me customize forms for list

When i try to create a custom InfoPath form on my Orders List I get the following error:
The SharePoint list form can't be customized with InfoPath because fields of an unsupported data type are marked as required, or because fields are corrupted. In SharePoint, try deleting the columns or editing the column properties to remove the required attribute. - Product (Lookup)
Additional information:
The Site contains;
Two Site Content types Product and Order. Order does have a lookup field to product, it is a optional field so NOT required.
Two Lists. A Products list with Product as Content Type and an Orders list with Order as Content type.
The Site Collection has the SharePoint Server Enterprise Site Collection features activated. Creating custom InfoPath forms for the Products lists works without any problem.
I tried to delete my List and recreate it but it i still get the same error. Hope someone can help me with this issue.
Thanks
Apperantly this was due to to the Title field in the Content Type being a required value. Changing the lookup to the items ID solved it.
This worked for me. But if you don't want to use the ID field in your views or on the form, here are a couple tips to replace it with the Title (or other column) in your lookup field...
Replacing the IDs in the form:
In InfoPath, create a new data source for the lookup field. Follow through the prompts to find the list to lookup. Once it's added, change the Value to ID. This will now set the dropdown list in the form to display the Title values as well as properly link the IDs in the list.
Use Title (linked to item) in your list view without instead of the ID:
Create a new index in the list you're looking up for the field you want to be linked. Then go back to the main list and change the lookup back to Title (linked to item). Note that this will again break the ability to edit the form in InfoPath. Changing it back to ID will allow InfoPath editing again. Then just change it to Title (linked to item) again when done. There's probably a "right" way to do this but it works for me.
Apperantly this was due to to the Title field in the Content Type being a required value. Changing the lookup to the items ID solved it.
Simple solution to this is, create a lookup field using SharePoint List settings, and then edit the form with infopath for further design related changes. When you creates lookfield using infopath this gives above issue, i could resolve it by creating list column and then editing form with InfoPath.

How can I filter a Sharepoint 2007 libarry list based on current user login?

I would like to know how I can filter a SharePoint library list based on current user login.
Suppose I have created the followings:
1) A SharePoint form library containing bunch of uploaded InfoPath form data.
2) The InfoPath form template contains a promoted text field called "TargetUser" to store user domain login (ex: DOMAIN\JOE) and every InfoPath form file in the library has a valid domain name stored in the "TargetUser" field.
I have created a custom view for the form library and would like to filter this view so only items whose "TargetUser" field matches current user's login ID are displayed.
I went to Edit View page to customize the view and tried to use the [Me] function but I got a "Filter value is not a valid text string" message instead when clicking OK. Apparently [Me] returns a Person/Group data type and the filter cannot compare its value to that of "TargetUser".
I tried using other text functions (ex: TEXT([Me],"") hoping to extract default string value from [Me]. The filter accepted the parameter without any error but the resulting fitlered list does not display any items at all.
I have googled this subject but I have not found any solution.
It would be greatly appreciated if anyone can help me to create a functional filtered list.
And FYI, my SharePoint 2007 installation is just WSS 3.0 + Form Server. I do not have MOSS 2007 (so no MOSS 2007 web parts or web services).
Thank you.
Jason
Is there any reason your TargetUser field is a text field instead of a People or Group field?
The [Me] identifier can be used to filter list items based on a People or Group column, but not on text fields.
Well. It looks like no one here has the answer.
Nevertheless, another user on Technet forum has a very good solution.
See this link for more information

In SharePoint, how can the "Issue ID" column of an issues list be included in the detail form (DispForm.aspx) and/or alert emails?

We've created a pretty standard issue tracking system based off of SharePoint's template with just a few extra columns. On the list view (AllItems.aspx), the first column is called "Issue ID" and has a number. Our developers and QC use that number in discussions. However, that number doesn't seem to want to show up on the detail form (DispForm.aspx) nor in the alert email.
Can this field be included in at least one of these communication methods? If so, how?
Thank you.
We did something similar and used workflow via SharePoint Designer to copy the ID field into a field called "Issue Number". The workflow gets triggered automatically on Create / Edit (we included edit because the field can be modified by the user on the edit form and if that happens we want the number refreshed with the actual ID).
Before you create the workflow in SharePoint Designer, you need to add a column called "Issue Number" to the list you want to tweak.
List item
Open Sharepoint Designer
List item
Click File New -> Workflow
Give a name for the workflow
a. select the list from the dropdown
b. Uncheck Allow this workflow to be manually started and check automatically start on new and change then press Next
Give the step a name like "Assign Issue Number"
Create a Condition
If Compare a field -> If Issue Number not equals Current_Item:ID
Create an Action
Update List Item -> Set Issue Number to Current_Item:ID
Press Finished and test out by creating a new issue.
*The Issue Number will appear on the form and if you have emails setup to notify on assignment it will appear in the reassigned template.
*It will not appear in the created email confirmation because the workflow gets triggered after that email was executed.
I just added the issue ID using a total of 4 characters. Create a new column, set it to a Calculated column, in the formula type [ID]. Voila! The ID is now in your detail view.
The ID link returned the for me, however, the work around which sufficed for me was to enter 'Created' in the Calculated Column formula and ensure it is set at date and time. That then creates a unique idenity (unless you receive more than 1 list update per minute) than can be viewed in the email alert message

Resources