Data Conversion With Node Path Like InsertAndUpdateNode

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
JefferyD
Posts: 178
Joined: August 31st, 2021, 11:37 am
Contact:

Data Conversion With Node Path Like InsertAndUpdateNode

Unread post by JefferyD »

The data conversion services generally take in a value or set of values and return converted versions of those values. However, for when working with a dynamic list that contains values to be converted, could an option be added to provide a location/path instead of the value(s) to the data conversion services and have them replace the previous value exactly where it was found?

Essentially, it would work like the InsertAndUpdateNode service except that it converts the value of all the found nodes instead of replacing or adding a child node to them.

Example
Given a path like WorkData/GetRecords/Output/Result/CreatedDate, the ToDate service could just modify the value of every instance of CreatedDate found in GetRecords directly.

Reason
I have found myself in situations where I have lists of records and want to convert a value of each record. In those situations:
  • Just converting the values gives me no way to determine where to put the converted value. The previous value is lost and any kind of record identifier cannot be included.
  • Using a Loop to only work on a single record at a time makes it easier to accomplish, but that requires a few extra steps and the performance impact seems to quickly add up as that total number of records increases. It can also be quite inconvenient if needed in multiple locations as it cannot be made into a reusable method due to InsertAndUpdateLoopNode.
  • By making it a single service, performance optimizations can be made to the service itself. For example, if there are duplicate values, then they can be replaced with the result of the first conversion instead of redoing the whole conversion again. This can be especially valuable if there are certain conversions that take a bit more time.
word count: 298

Tags:
CathyC
Posts: 472
Joined: November 16th, 2021, 11:15 am
Contact:

Re: Data Conversion With Node Path Like InsertAndUpdateNode

Unread post by CathyC »

I created this mockup to better illustrate the concept
image.png
All the From and To parameters on timezones and culture and format are still present, and still would be filled out as much as they are today, but instead of pulling out the value from the Inquire result, to put in this service, we tell the service to go to the source and change it there.
word count: 65
CathyC
Posts: 472
Joined: November 16th, 2021, 11:15 am
Contact:

Re: Data Conversion With Node Path Like InsertAndUpdateNode

Unread post by CathyC »

I like this idea. Originally InsertAndUpdateNodes was created to do just this, but it relied on EASYProcess functions. Now that EASYProcess functions for date conversions are deprecated, it removed that functionality from insertandupdatenodes, but the service is still very powerful and widely used.

This would be introducing a new service (ToDateInPlaceConversion? ConvertToDateByNodePath? ToDateByPath? NodesValueToDate?) that accomplishes the same thing that we wanted to back then.

The duplicate dates inefficiency Jeff pointed out is probably the biggest reason this should be discussed. I didnt realize that my advanced date conversions (not using loop for greater efficiency) could still be improved upon until Jeff pointed it out, but at that point thought it would be unrealistic to add further complexity to achieve that efficiency level - though it would be nice.
It would be great to have a tool that does this built into EASYProcess
word count: 142
JefferyD
Posts: 178
Joined: August 31st, 2021, 11:37 am
Contact:

Re: Data Conversion With Node Path Like InsertAndUpdateNode

Unread post by JefferyD »

It looks like I previously made a similar suggestion as well. It includes another example and additional context, so I'm sharing it here:
viewtopic.php?p=369
word count: 28
JustinVanRegenmorter
Posts: 573
Joined: August 26th, 2021, 9:56 am
Contact:

Re: Data Conversion With Node Path Like InsertAndUpdateNode

Unread post by JustinVanRegenmorter »

Task 11394 has been created to discuss this feature.
word count: 9
Post Reply