Select to view content in your preferred language

Power Automate to Enterprise - Create a record in a feature layer not plotting properly

496
5
06-20-2024 10:47 AM
alo5108
Occasional Contributor

I am having two issues with the "Create a record in a feature layer" action in Power Automate. One being that the datetime isn't transferring into the feature layer. What format does it need to be converted to for Esri?

 

Secondly, I am trying to plot by coordinates but the points are being thrown to null island. Is the geometry input incorrect? The "outputs" next to x and y are the coordinate fields.

geometry.png

0 Kudos
5 Replies
RobertAnderson3
MVP Regular Contributor

How are you setting your time? Feature Layers store it in Epoch time which is annoying, but if you use the Add time/Convert time actions in Power Automate, the dynamic content output no matter what format they are should work fine.

This is how I have the geometry field set up for the inputs when I am creating a feature. Though I definitely went the more, copy from an example somewhere than having a complete understanding of all of it.

What coordinate system are your X and Y values in?

RobertAnderson3_0-1718908528363.png

 

0 Kudos
alo5108
Occasional Contributor

Thanks for your response! All of the information, including the coordinates are being scraped from an email and currently dropped into an Excel file, but I am trying to publish the information into the feature layer rather than having to export the excel data and append to a feature layer. The above looks like you might be pulling geometry from an existing layer, my input values are just the lat/long pulled from the email body as text. So maybe it is a formatting issue?

My datetime formatting is as follows:

formatDateTime(variables('DateTime_Final'), 'MM-dd-yyyy HH:mm:ss')

 

0 Kudos
RobertAnderson3
MVP Regular Contributor

I am indeed pulling from an existing layer at this point in time. I think the issue as Pavel outlines below is likely that the coordinates you are providing do not match the spatial reference you are giving? Do you know what coordinate system your coordinates are in?

Have you verified looking at the run of your flow what the values being extracted from the email text into these variables actually are?

That DateTime format should work fine, that's how I end up entering it as well. Are the values not passing at all or are they wrong? The feature layer stores times as UTC.

Are you able to share images of your flow, or at least of the sections where you set the XY and time variables, and the Create Feature action?

0 Kudos
alo5108
Occasional Contributor

The screen grab below shows the output of the "Create a record in a feature layer" action. The coordinates are populating in the table but not plotting, so I feel like I am missing a step here. I did update the coordinate system after confirming.

MSFlow.png

The datetime also shows here but does not show in the feature layer. The error in the "raw outputs" is as follows:

"description": "Cannot convert a value of type 'java.lang.String' to 'TIMESTAMP'."

alo5108_0-1719243483470.png

 

I hope this helps to clarify! Thank you both for your assistance! @PavelJ 

 

0 Kudos
PavelJ
by Esri Contributor
Esri Contributor

Hello,
From the description, it seems that the coordinates you are using don't match the spatial reference provided.

Regarding time:
Example 1: Using your date format.
12-31-2024 13:30:30 will map to

PavelJ_2-1718910332528.png

 


Example 2:

PavelJ_0-1718909964615.png

 

Will map to:

PavelJ_1-1718909984725.png

 

Could you please provide additional details on the DateTime issue.

0 Kudos