Support Topics Documentation Slack YouTube Blog

Change property value (from timestamp to ISOstring) to a related object

I want to set an event handler to change a value (from timestamp to ISOstring) of a related object with codeless. I spent few hours to get nothing!

This is my URL request …/data/Suppliers/51A75945-83F4-6DE5-FF10-37C3A6FC4A00?loadRelations=DealsList

Result here:
{
“ReferralCode”: 2222,
“Company”: “Delta Hamburg”,
“img”: “…/files/Suppliers/img/delta-fleisch.jpg”,
“Owner”: “Jan Thomas Kreuz, Ludmila Kreuz”,
“Telephone”: “040-431610”,
“Address”: “Lagerstrasse 11”,
“Email”: "info@delta-hamburg.de",
“PostalCode”: 20357,
“TaxId”: “DE118540755”,
“created”: 1560934444953,
“City”: “Hamburg”,
“Mobile”: “+49123456”,
“ownerId”: null,
“Country”: “Germany”,
“updated”: 1560934632472,
“objectId”: “51A75945-83F4-6DE5-FF10-37C3A6FC4A00”,
“___class”: “Suppliers”,
“DealsList”: [
{
“ReferralCode”: 2222,
“img”: “…/files/deals/img/ribeye-us-beef-morgan-ranch-black-hg_2.jpg”,
“Telephone”: “+4915756755276”,
“title”: “Morgan Ranch US Beef Ribeye ca 300 gr”,
“ExpireDate”: 1561500000000,
“created”: 1560885210000,
“Publisher”: “Delta Hamburg”,
“ownerId”: null,
“VolumeType”: “Kg”,
“Price”: “15,- €”,
“Note”: “5% per Vorkasse”,
“PostalCodeWarehouse”: “21075”,
“MaxQuantity”: 24,
“Delivery”: true,
“updated”: 1560959689929,
“objectId”: “DC2FD577-672A-BB5D-FF5F-4CB3AAE35A00”,
“VolumePrice”: “50,- €”,
“___class”: “Deals”
}
]
}

I need to change the value of “ExpireDate” from timestamp to ISOstring.
I don’t know how can I access the array “DealsList”.

Please, give your App Id. Wich SDK you use? And give more information.

My app ID is 9171DE0B-E8E1-389D-FF48-60C0FD002A00
I don’t use a SDK.

I want to use an event handler and codeless to change that property.

Hi Mario

You need to get “DealsList” and modify “ExpireDate” for each list item in a loop

Regards, Vlad

It works!
This is the solution, I hope it will be useful also for other codeless fans :slight_smile: