Related Items-having a serial number for each row
- WinstonFroidPinto
- Posts: 32
- Joined: Thu Mar 16, 2017
Hi,
I want to have an incrementing serial number field in related items grid,first item should have serial number as 1 by default and on adding of each row it should increment by 1.How can I accomplish this?
Thanks,
Winston.
I want to have an incrementing serial number field in related items grid,first item should have serial number as 1 by default and on adding of each row it should increment by 1.How can I accomplish this?
Thanks,
Winston.
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi,
You can populated the incremental field either in a workflow or via JavaScript. To get the number of items in the list, use JSOM or REST-api:
http://sharepoint.stackexchange.com/que ... -in-a-list
You can populated the incremental field either in a workflow or via JavaScript. To get the number of items in the list, use JSOM or REST-api:
http://sharepoint.stackexchange.com/que ... -in-a-list
- WinstonFroidPinto
- Posts: 32
- Joined: Thu Mar 16, 2017
Hi,
Thanks for the reply.
I have two fields in the related items grid.I am able to populate one of the field which will get the value from form field for each of the items entered in the grid(inline editing),which i am able to do it through the following code:
fd.populateFieldsInGrid($('.related-items'), {
FieldInRelatedItem: valuefromformfield
});
But the second field needs to be updated incrementally like the first row will have the value as 1 and next item entered should have the value as 2 and so on.Yes i am able to retrieve the count each time an item is being added but i am in confusion how to populate it on item basis.
Thanks,
Winston.
Thanks for the reply.
I have two fields in the related items grid.I am able to populate one of the field which will get the value from form field for each of the items entered in the grid(inline editing),which i am able to do it through the following code:
fd.populateFieldsInGrid($('.related-items'), {
FieldInRelatedItem: valuefromformfield
});
But the second field needs to be updated incrementally like the first row will have the value as 1 and next item entered should have the value as 2 and so on.Yes i am able to retrieve the count each time an item is being added but i am in confusion how to populate it on item basis.
Thanks,
Winston.
- WinstonFroidPinto
- Posts: 32
- Joined: Thu Mar 16, 2017
Hi,
Also I would like to know how to accomplish the following:
In related items grid I have a dropdown field,on change if value=something then only make the other field editable and mandatory or else dont make it mandatory and readonly,similarly for the second entry and so on.How can this be achieved on per item basis?
Thanks,
Winston.
Also I would like to know how to accomplish the following:
In related items grid I have a dropdown field,on change if value=something then only make the other field editable and mandatory or else dont make it mandatory and readonly,similarly for the second entry and so on.How can this be achieved on per item basis?
Thanks,
Winston.
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi!
It will take about 3 hours ($300). You can purchase the support minutes in the store:
https://spform.com/buy/support-maintenance
You can try to handle adding new rows event and increment the index in your handler with JSLink. Then pass the new object to populateFieldsInGrid method or modify the original one. Another option is using our support service: we can simplify subscribing on editing events via our JS-framework, say this way:WinstonFroidPinto wrote: ↑27 Mar 2017
But the second field needs to be updated incrementally like the first row will have the value as 1 and next item entered should have the value as 2 and so on.Yes i am able to retrieve the count each time an item is being added but i am in confusion how to populate it on item basis.
Code: Select all
fd.relatedItems(0).add(function() { // the code of your handler })
https://spform.com/buy/support-maintenance
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
It also can be done by customizing the grid view or a field with JSLink, ex.:WinstonFroidPinto wrote: ↑27 Mar 2017In related items grid I have a dropdown field,on change if value=something then only make the other field editable and mandatory or else dont make it mandatory and readonly,similarly for the second entry and so on.How can this be achieved on per item basis?
https://www.spjeff.com/2014/05/17/quick ... rendering/
- WinstonFroidPinto
- Posts: 32
- Joined: Thu Mar 16, 2017
Hi,
I have shared the view of related item in the form with quick edit.I want to achieve something like if Purchase Type is Replacement then only make fields SAP Asset No and WDV mantatory or else they will be readonly and non mandatory.It should repeat for the other items in the grid as well.How can this be achieved?I went through someof jslink examples but all are invoked on addition of an item in jsgrid and not on change of a dropdown within an item.
Thanks,
Winston.
I have shared the view of related item in the form with quick edit.I want to achieve something like if Purchase Type is Replacement then only make fields SAP Asset No and WDV mantatory or else they will be readonly and non mandatory.It should repeat for the other items in the grid as well.How can this be achieved?I went through someof jslink examples but all are invoked on addition of an item in jsgrid and not on change of a dropdown within an item.
Thanks,
Winston.
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
So, do you want to make columns in the related items control (in grid mode) mandatory based on a value of a form field? If so, bind JSLink to those fields in the related items and check form's field value from the code.
You can send the detailed description of your case with screenshots of the form to support@spform.com and our support team will provide you with estimation of the task.
You can send the detailed description of your case with screenshots of the form to support@spform.com and our support team will provide you with estimation of the task.
- WinstonFroidPinto
- Posts: 32
- Joined: Thu Mar 16, 2017
Hi,
I want to make a field readonly/mandatory based on the dropdown value which is present in the related items grid itself for that particular item in the grid.
I have attached a screenshot of related items with quick edit for your reference.
There is a choice dropdown field in the grid,based on the value of it i want to make the other field readonly/not readonly.This should happen for each row added in the grid.I could not find any change event for dropdowns within related items as well. Nee more info on this.
Thanks,
Winston.
I want to make a field readonly/mandatory based on the dropdown value which is present in the related items grid itself for that particular item in the grid.
I have attached a screenshot of related items with quick edit for your reference.
There is a choice dropdown field in the grid,based on the value of it i want to make the other field readonly/not readonly.This should happen for each row added in the grid.I could not find any change event for dropdowns within related items as well. Nee more info on this.
Thanks,
Winston.
- Attachments
-
- screenshot.PNG (4.75 KiB) Viewed 3307 times
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Our support team can implement this logic for you. It will take 6 support hours ($600). If it's OK, purchase the support service in our store:
https://spform.com/buy/support-maintenance
https://spform.com/buy/support-maintenance
-
- Information
-
Who is online
Users browsing this forum: No registered users and 10 guests