Power Apps SharePoint date field not updating on button click - sharepoint

I have a button for the user to submit a SharePoint list item for review. On the click even a variable is set which updates the text status field in the SharePoint list. Here's how the status field is updated, it checks if the value is blank and sets it to draft status, if that fails then it checks the variable status update field for blanks, if nothing in the variable then it uses what is stored, otherwise it takes the value from the variable:
If(IsBlank(Parent.Default),"Draft",If(IsBlank(varStatusUpdate), Parent.Default,Text(varStatusUpdate)))
For the date field, I'm also checking for nothing on the SharePoint list, then I'm checking the same status update variable. When blank, use what is stored in the list. If the value is "pending approval" then it should get current date.
If(IsBlank(Parent.Default),Blank(),If(IsBlank(varStatusUpdate), Parent.Default, If(varStatusUpdate="Pending Approval", Now(),Parent.Default)))
When testing the updated Now() value appears on the screen but it isn't saved to the list. When published to SharePoint the value is never saved or updated.
Any ideas?

One way of updating the logic and the value from a Datacard in your form to a datasource is to change the Update property for a specific Datacard
Example -
Originally:
Changing the Update values:
or
Where DataCardValue2_6.Text is the text input for the column.

Only way I could get this to work was to use the patch command like below:
Patch('LTRequest', ThisItem,{
SubmitDate: Now(),Status:Text("Pending Approval")});
Back();

Related

How do I use power automate to update/overwrite existing data on a SharePoint list by toggling a checkbox on a Nintex form?

My form is linked to a sharepoint list. In power automate, a flow has been set up so that when the check box is toggled for the first time, it populates the associated ts fields with the user and the current date. Upon completion, the associated bln field should change from false to true. Also, the associated bln field should remain true.
I cannot figure out how to add a step so that when the check box is toggled for a second or third time, it will update/overwrite the associated for the date and name. It currently only saves the information from the first user interaction.

How to pass value from one form to another in powerapps

I have a created list with values in it
When I create an item and click on "Next" then it should save and redirect to "Edit form". But instead of showing the values I have entered, it shows the previously edited item.
What am I doing wrong?
Please check the default value of the form.And also one thing you can do is ,you can always filter the First row from the list,so it always shows the latest saved data.

Clear values from Netsuite Item Custom field

I have created a Custom Field in Netsuite for Item.
Due to some data issue, the value in the custom field is corrupted and i need to again reset all the values to null or empty.
How i can empty the Custom Field value to null through the Netsuite Portal and not through scripts?
Just change the data type on the custom field. You will get a warning saying "Changing this custom field type will delete all data in existing records. Are you sure you want to do this?" Click "OK" and save, then you can change it back to the original data type and carry on as you were.
#Krypton's answer is definitely the fastest, you can also use the Mass Update feature to accomplish this, but you'll need to do each item type individually:
Lists -> Mass Update -> Mass Updates
Expand "General Updates"
Click on Items -> Inventory Item
Leave the "Criteria" blank if you want to clear the field for all records
On the "Mass Update Fields" tab, check the "Apply" box next to the field you want to clear
Do not enter anything in the "Value" column
Click the "Preview" button.
Click the "Perform Update" button
You'll need to do this for each item type (Inventory Item, Non-Inventory Item (for Sale), Kit/Package, etc.)
Another way of doing it is to uncheck the Store Value, save, check Store Value, save.

InfoPath Validation Error on older list items: Only 'true' or 'false' allowed

I have a custom SharePoint 2013 list (which started as a SP2010 list) with roughly 2,000 items. It was recently brought to my attention that I am having a strange issue with a check box/boolean type. I can't recall if it was originally created as a Yes/No column in SharePoint before the web form was created in InfoPath.
The field name is Report Received. Up until now, and only for troubleshooting, the checkbox was never actually on the form. I had a rule where if a question was answered, the field value was set to 'true' in lowercase without quotes.
If I create new item in the list, the checkbox works as expected.
If I attempt to edit a previous item that the value was already false, I get a validation error upon save, that states that only 'true' or 'false' is allowed.
In conclusion, I can only assume that for a period of time, something was buggy in my rule/form/field.
My goal is to either set that field to blank on the items, or fix the assumed corruption in the field on those items.
Fortunately, I don't have many items to fix.
One idea i had was to create a view called "Test".
On that view i dragged the Report Received field on the form. I also added a calculated field below it which shows me the current value of the field, and 3 buttons, each with a rule, to either set the value to blank, set it to false (lowercase), set it to true (lowercase).
I then opened an old item that is giving me the error, to test my new buttons.
My first observation is that the calculated field indicates that the value is currently false (lowercase)
Unfortunately, when i click any of them, i instantly see that the checkbox turns red, indicating that only 'true' or 'false' is allowed when i mouse over the checkbox.
The strange thing is that my calculated field indicates that the value changed to TRUE in uppercase, even though the box is unchecked.
I am noticing this before attempting to save the form.
If I create a new item in this list, and go to my "test' view, the buttons work just fine.
While InfoPath seems to prefer true and false, the value in the SharePoint lists are Yes and No.
Any ideas how I may be able remove the corruption on these older list items, without deleting and recreating them?
I am currently using InfpoPath 2010 to edit the form.
Thanks!
I am kicking myself. I ran Rule Inspector and saw that a rule i was not aware of was causing my issues. I deleted it, and now everything is working as expected.
Thanks for the info. I was experiencing the same thing and was able to find my error as well by using Rule Inspector. More specifically, my issue was being caused by a rule running on the "submit" buttons that set the checkbox or boolean field to "Yes" to match what was in SharePoint. I found that you have to actually use the formula (fx) field in InfoPath and enter boolean("true") as the formula to get InfoPath to pass the value correctly to SharePoint!

Sharepoint calculated field's formula for created by

i have a sharepoint list
with 2 users for examole (user A and user B)
i need a calculated field in the list items such that if user "A" created the item the field vaule will be "X" and if user "B" created the item fields value would be "Y"
but i couldnt use [created by] in the furmiula of the calculated field !! why is that ?!! and is there another way to do what i need to do ?!
If using Sharepoint Designer is an option you can create a workflow for that list. Set it to start when a new item is created -or- edited, use a condition of "If Created_By equals ..." and an action of "Set yourfield to yourvalue", then add an Else If branch and repeat. This will always override anything a user enters in "yourfield". Takes about 2 minutes to do all of this.
I believe you can create a text field that has the default value set to [Me] which should then be usable in a calculated field.
For more complicated formulae (i.e. anything with conditional logic), try creating an event handler for the content type (or doc library). This will allow you full control to set the fields to what you desire.
The field can be hidden from the user inside the edit screens.
Make sure use the STSDev from codeplex to setup the solution for deployment.

Resources