The below script works , but the issue is , it searches for the oldest doc created (in other words doc created first ) and sets the value in the required field .
If there are docs with same p1 as that of prodorder , it sets HT00001 instead of HT00002 or HT00003 . But I want to set the value of the latest doc created that is HT00003 .
Hi, you can try something like querying the table and get the last or first one depending on the order but I think there’s an easier way of doing it, what I said was just the first thing that came out on my mind.
Hi @johnskywalker . [quote=“johnskywalker, post:2, topic:16814”]
Hi, you can try something like querying the table and get the last or first one depending on the order but I think there’s an easier way of doing it, what I said was just the first thing that came out on my mind.
[/quote]
Thanks for swift response , could you tell me how to do that ?
Thanks a ton for swift response @johnskywalker . As I am not a naturally gifted programmer , the above code looks bit confusing , could you please guide me , if possible .