web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Google Map Launch

(0) ShareShare
ReportReport
Posted on by 239

Hi,

I have an app that the user logs their travel for reimbursement and management has a new requirement the user has to have one map per day of travel.  Before I had it set up to generate one map with every waypoint for all of the travel recorded. With this change, I am trying to set it up where the user will use a date picker to select which day they need to generate the map, map open in a new tab for them to download and upload.  

 

In this section of code I am getting “Unexpected Characters. The Formula contains 'BracketOpen' where ParenClose is expected” and if I take away the brackets then I get this error: “Unexpected Operator. We expect an operator such as +, *, or & at this point in the formula.

 

ClearCollect(
 GoogleItemsOrigin,
 First(GoogleItemsWaypoints)['cr0d7_mildestination']);

ClearCollect(
 GoogleItemsDest,
 Last(GoogleItemsWaypoints)['cr0d7_mildestination']
);

 

Here is the complete code: 

 

ClearCollect(
 GoogleItemsWaypoints,
 ShowColumns(
 Filter(
 'Travel Reimbursements',
 !IsBlank('Mil Date of Travel') &&
 'Mil Date of Travel' = DatePickerTravelDate.SelectedDate
 ),
 "cr0d7_travelid",
 "cr0d7_mildestination"
 )
);


ClearCollect(
 GoogleItemsWaypoints,
 ForAll(
 Sequence(CountRows(GoogleItemsWaypoints)),
 Patch(
 Last(FirstN(GoogleItemsWaypoints, Value)),
 {RowNumber: Value}
 )
 )
);

ClearCollect(GoogleItemsOrigin,

First(ShowColumns(Search(
 Filter(
 'Travel Reimbursements',
 !IsBlank('Mil Date of Travel')
 ),
 TravelSelection,
 "cr0d7_travelid"
),"cr0d7_milorigin"))

);

ClearCollect(
 GoogleItemsOrigin,
 First(GoogleItemsWaypoints)['cr0d7_mildestination']);

ClearCollect(
 GoogleItemsDest,
 Last(GoogleItemsWaypoints)['cr0d7_mildestination']
);

Set(varMaxWaypoint, Max(GoogleItemsWaypoints, RowNumber));

ClearCollect(
 GoogleItemsWaypoints,
 Filter(GoogleItemsWaypoints, RowNumber <> varMaxWaypoint)
);

Launch("https://www.google.com/maps/dir/?api=1&origin=" & GoogleItemsOrigin[0]['cr0d7_mildestination'] & "&destination=" & GoogleItemsDest[0]['cr0d7_mildestination'] & "&travelmode=driving&waypoints=" & Concatenate(GoogleItemsWaypoints, "cr0d7_mildestination", "|"))

 

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard