I have an action I use to add information about photographs to an existing draft. It includes the date, a description from the working draft and should include the location. I’ve just noticed that the last few times I’ve run this it has returned my home location rather than the photo locations (Drafts has access to location services).
Can you see why this would be?
let draftFound= Draft.find("XXXXXXXX-YYYY-ZZZZ-TTTT-WWWWWWWW") // Original post wants to do insertion between title and body // Insertion consists of a date line, the content of the originating/current draft, and the current location coordinates. // Let's build the new content to insert... // Start with the date line let strNewContent = draftFound.processTemplate("[[date|%A %d-%m-%y - %R]]"); // Add the current draft content on a new line after the date and followed by another newline strNewContent = strNewContent + "\n" + draft.content + "\n"; // Add the coordinates for the current draft (current location should be most reliably based on modified coordinates) strNewContent = strNewContent + draftFound.processTemplate("[[modified_latitude]],[[modified_longitude]]") // Insert the new content by replacing the content with the new content between the title and body. draftFound.content = draftFound.title + "\n\n" + strNewContent + "\n" + draftFound.processTemplate("[[body]]"); // Update the found draft draftFound.update(); type or paste code here