5

I made a list for Event Planning, the columns name are:

  • Row(to change the order)
  • Subject
  • start time
  • duration
  • end time(sum of start and duration)

I need to copy each end time to start time of next item. how can I do so? is it possible to set something in another row?

  • You can achieve this using implementing JSLink – S.P Jan 7 '16 at 5:31
2

Considering that the only times a "start date" may then change is when an item is inserted or the item preceding it is changed, I would try and see if you goal can just be achieved by using item based event handlers.

An item added event could be used to retrieve the end date of the item preceding the one you are adding, and then setting the "start date" of the current one. In the same way, you can use an item updated event to check if there is an item after the one getting modified and then update the start date as needed.
The "start date" field could even be made "read only" so that end users couldn't manually update it anymore. More logic can be added as needed to allow for manual insertion with validation to ensure times do not overlap if that is needed - just use item adding/updating event instead that added/updated one, so that you may cancel the events if the validation fails.

Anyway, the way you are going to use the start and end dates may lead to dupplication of information (at least if the dates can't ever been set manually). Consider if your application structure can't be reworked so that the information isn't duped anymore (for example, each item could store the id of the preceding one instead of the ending time, but in this case probably you may want to develop a custom UI too).

  • Thanks, the idea of updating after after the one getting modified and then update the start date as needed. I will check and inform you – Shaghayegh Jan 7 '16 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.