InfoPath Forms Library Multiple Item Creation Issue in SharePoint Online - sharepoint-online

I have a Forms Library with a library InfoPath form. Everything is working fine until today a strange issue is observed and reported. Consider the below 2 scenarios in which the issue happens:
If I have items 121, 122, 123 and then I delete item 123 for some reason, then the next item that I create would be 124 ofcourse as I'm using the ID field to create my filename but this item upon editing would give me multiple items for each edit once submit button is clicked. But the strange part is if I leave 124 in it's last state for example after 2 edits now the latest ID would be 126 and create a new item 127, everything would be fine and each edit to 127 would update the same item.
The same behavior is exhibited for some of the old items but there is no real similarity between the items which have the issue and which don't and the problem is purely random.
The submit rules are pretty straight forward.
The current month is extracted using a substring formula from today().
enter image description here
The form year is calculated using the current year field which is extracted from today as well using the substring formula.
enter image description here
Based on the month form year is set to current year if the current month is before October.
enter image description here
Based on the month form year is set to current year +1 if the current month is after October.
enter image description here
Now I'm setting the Form ID to 1 if there are no items in the library
enter image description here
If there are items in the library and considering it is a new item with no Title then I'm setting the Form ID as below:
enter image description here
Now I'm setting the Form Title which I'm using as the filename in the form library submit with overwrite as yes.
enter image description here
Finally Submitting the form.
enter image description here
I tried everything but could not figure out what is causing the issue. Please help me with this.
Thanks,
Suhas

The issue is with the way the Title field is set in the workflow vs the way it is set in the form. Both were mismatching and hence every time the workflow runs, it is creating a new item for the same form which increments the ID.

Related

How do i write more complex code in Lotus Notes views

i currently work on a project where i have to write a programm which processes raw data from a
Notes Database into an excel file using Lotus Script. The Database contains time information about how long different devices have been lend out. The output from my script looks like this:
June
Device
Counter
Times(Minutes)
Times(Hours)
--------
--------------
--------------
--------------
TestDevice1
3
270
4,5
TestDevice2
2
210
3,5
I am finished with the programm itself, now i need to have the same Output inside a Lotus notes View. I am very new to lotus notes and i have no idea how to do this. I know that it is possible to use Lotus Formula to programm. But i cant find anything about the language and how to use it. Maybe someone here can help.
You can look at the online documentation provided by HCL "About Designing Views"
Pay particular attention to "Selecting which documents display in a view" and "Creating columns in a view" (and its subsection "
Adding programming to columns").
That should give you a few ideas of how to progress.
You can get close.
Make a view to display the Device, Counter, Times, and Times columns, unsorted.
Once you figure that out, create a new column that displays the month. (Hint: See #Text formula.)
Now change it to subcategorized by month by changing the month column to be the first column, and then edit the column properties to give it a width of 1 or 2, not resizable, and make it a category column with twisties shown.
This will get you close. Instead of the month followed by column titles followed by the data, you will get column titles followed by the month followed by the data per month.

How to create a List Price Sheet filtered with Last Date Modified column in Dynamics-NAV

I'm trying to generate a List Price Sheet report using the Dynamic NAV gui, which is located under Departments > Sales & Marketing > Inventory & Pricing.
Under the Reports and Analysis there is an option called List Price Sheet, which we use to create the price lists as Excel Files.
What I would like to do is to return only items that has been created or modified during an specific year, instead of having a list of all Items in the ItemCard.
When I add the Last Date Modified as a filter, it does not matter what value I enter, it keeps giving me a warning saying...
One or more filters are not valid and will be ignored. Do you want to continue?
Is there's a way I can accomplish that using the GUI or this is something that needs to be done with a custom function?
this "List Price Sheet" is not a standard report (NAV has a standard set of reports for every modules) therefore we can't help. You should contact your (=your company's) NAV partner for help.
Maybe if you can share the warning/error what you getting when entering the date I can help. Here is a link which maybe helps : Entering Dates and Times in Dynamics NAV
Cheers!
Sorry I did not provided more depth information, the problem was, that I was trying to search as string the value "2015", which is not a valid parameter to pass when searching a DateTime column. I have to search using a Date range, cause I wanted to get the result for the specific year 2015, in my case, the value I should've pass was:
01/01/2015..12/31/2015
Which return all items that has been modified during this specific year. After doing that I found out that every time NAV developers updated the production site with the test site, all items were marked as modified the date the update occurred. So was not of use for me any way.

SharePoint 2013 Calculated Field not working all the time

I have a form where I need to include a calculated field. I made a very simple test using a calculated field where the formula is "=ID". I just want to confirm that the value I'm getting in the view is the same as the ID of the record in the list.
I press NEW and create a new record. Then when I see the new record in the view, the first column is the ID (let's say 11), then some proper fields form the form and finally the calculated field that instead of showing me the value 11, it shows 0.
Then I follow the following steps:
I go to Settings, List Settings
Click on the calculated field to edit it (only edit it with no modifications) and press on OK (no modifications to the calculated field at all)
Go back to the list of records and now the calculated value shows me the value 11
I google it but no solution.. there is someone say that this issue is from the column ID, it mean 'when you initially save the item is that there is no value for "ID" yet' !
and this isn't my state, the column id is incremented normally when add new item.
Anyone can help me to identify with the calculated field does not shows 11 automatically after the record is saved?
or by follow another solution like using a workflow 2013..
Thanks a lot
You can not use [ID] in a Calculated Column formula.
I won't bother with the long technical explanation...
If it was possible, Microsoft would have added it to the list of Fields you can select when writing a Formula.
Workaround is to make a simple SharePoint Designer Workflow which kicks off on Item creation and saves the ID value to another Column.
You can then use that Column in your Calculated Formulas
If you're doing anything front-end.. jQuery.. CSR/JSlink.. the ID value is available in the attribute id of the Item TableRow (TR) as x,id,y
so you can get the id with
var ID={element}.getAttribute('id')[1]
Update #1 - example code used:
="<a href='/sites/ru1/Lists/ao26c/DispForm.aspx?ID='
target='_blank'><img src= '_layouts/images/blank.gif'
onload= ""var row=this;
while(row.tagName!='TR'){row=row.parentNode};
this.parentNode.href+=row.‌​getAttribute('id').split(',')[1];
"">Открыть</a>"

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

SharePoint: Calculated Column Values Disappear When Editing List Item. Any ideas?

I have a calculated column in a custom SharePoint 2007 list, with the following formula:
=CONCATENATE("IR-",[ID],"-",LEFT(UPPER([Title]),25))
If an item is created in the list, everything is fine, however, when an item is updated the [ID] column is no longer in the calculated column for that item.
So, on creation: "IR-40-TheTitleIsHere", but after edit, it is, "IR--TheTitleIsHere".
Anyone have some insight on why this would be happening?
I confirm the behavior mentioned above. Any Add/Edit will wipe out the [ID] portion. If you edit the column in the list and update the formula, it will update ALL list items to be correct (until you do an edit on the item).
I found this post that mentions the same problem.
Sounds like the only solution would be to make a simple workflow using SharePoint Designer that would update a text field in your list.
I had an issue similar a while back. Through other blogs and experts, I discovered that the [ID] column should not be used in a calculated column because it wreaks havoc and causes many errors. Sorry - remove the ID column and you should be fine.
This question is a little old, but I had the same issue and found a solution for it. It is a pretty specific fix and won't help everyone -- it involves using javascript in a content editor web part to update the calculated field.
This site -- http://blog.pathtosharepoint.com/2008/09/01/using-calculated-columns-to-write-html/ -- gives an example of how to use javascript in the same manner that I used it.. the important block of code is the first while loop. The point is to grab the out of box ID column from the list and update whatever calculated field needs the ID.
In my case I had a URL in a calculated field that required the ID as a parameter.. of course that wouldn't work normally because you can't put the ID in a calculated field. What I did was I put "?ID=null" in the ID parameter of my calculated field's url, I then replaced that with the ID that was retrieved using javascript.. so whenever the page is loaded, the js kicks off and updates all of the URLs to have the correct ID.
I know this is very old but I couldn't find a newer version of the question anywhere else and the answer above from ferr solved the problem for me but isn't very clear so I thought I'd update it.
This assumes that you want to use the ID in the output HTML (for example within a link), I think this is fairly common.
Using the javascript from the pathtosharepoint link I added in the following to get the id with an if statement for safety:
if (HTMLregexp.test(CellContent)) { //original pathtosharepoint line
if (NodeSet[i].parentNode.getAttribute("iid")){
var SPID = NodeSet[i].parentNode.getAttribute("iid").split(",")[1];
CellContent = CellContent.replace("SPIDReplace", SPID)
}
NodeSet[i].innerHTML = CellContent; //original pathtosharepoint line
This is put in the while loop of the latest pathtosharepoint fix at time of writing. This works for me on SharePoint 2010.
Note: Include the string "SPIDReplace" in your calculated column to get it replaced by the item ID.
pathtosharepoint page: http://blog.pathtosharepoint.com/category/calculated-columns/
pathtosharepoint code: http://pathtosharepoint.com/Downloads

Resources