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 Platform Community / Forums / Power Apps / Office365.CalendarGetT...
Power Apps
Unanswered

Office365.CalendarGetTables() and language

(1) ShareShare
ReportReport
Posted on by 6

I am basically willing to let the user select on which calendar some events should be saved to. Using Office365.CalendarGetTables() you can provide in a dropdown hss calendards. I would like to default the dropdown to the default calendar, but if it is a German user this calendar is named Kalender and in French Calendrier ... how should I go about defaulting to Calendar/Kalender/Calendrier/...?

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @CarlosMoreira70 ,

    Could you please share a bit more about your scenario?

    Do you want to display a default Calendar name within the Dropdown box based on the user's local language?

     

    Based on the issue that you mentioned, I think the Language function could achieve your needs. I have made a test on my side, please take a try with the following workaround:3.JPG

     

    2.JPG

    Set the Items property fo the Dropdown box to following:

    DropColumns(
     AddColumns(
     Office365.CalendarGetTables().value, 
     "CalendarName", 
     If(
     DisplayName = "Calendar",
     If( /* <-- Based on user's locale, display corresponding Calendar name value */
     Right(Language(),2) = "US",
     "Calendar",
     Right(Language(),2) = "FR",
     "Calendrier",
     Right(Language(),2) = "DE",
     "Kalender"
     ),
     DisplayName = "Birthdays",
     If(
     Right(Language(),2) = "US",
     "Birthdays",
     Right(Language(),2) = "FR",
     "Anniversaires",
     Right(Language(),2) = "DE",
     "Geburtstage"
     ),
     DisplayName = "United States holidays",
     If(
     Right(Language(),2) = "US",
     "United States holidays",
     Right(Language(),2) = "FR",
     "Vacances aux Etats-Unis",
     Right(Language(),2) = "DE",
     "USA Feiertage"
     )
     )
     ),
     "DisplayName"
    )

    Then set the Default property of the Dropdown box to following:

    If(
     Right(Language(),2) = "US",
     "Calendar",
     Right(Language(),2) = "FR",
     "Calendrier",
     Right(Language(),2) = "DE",
     "Kalender"
    )

    More details about the Language function in PowerApps, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-language

     

    If you want to reference the Calendar Id from above Dropdown box (to create events), please consider use the following formula:

    Dropdown1.Selected.Name /* <-- returns the Calendar Id for the selected Calendar name e.g. AAMkAGNlZWJhNDFhLWVkZDQtNGEwMi1hNGYxLWE4NjgxODQxYjE1OABGAAAAAADs9uoqJJanQrMetqhMVhx6BwCSaWLzoY45Rr_4uGphA-0GAAAAAAEGAACSaWLzoY45Rr_4uGphA-0GAAIdUAygAAA=*/

     

    Best regards,

  • CarlosMoreira70 Profile Picture
    6 on at

    thank you.

    I can already display the calendar names in the user local language, that is the default provided back by the Office365.CalendarGetTables().value

    But I cannot set the default value as the displayname is different based on the user regional settings

    A French user will get the drop down defaulted to "Anniversaire" the first in alphabetical order

    I guess I could indeed write an extensive set of if clauses to cover the 25+ languages of the users of the app to default to the "calendar"...

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @CarlosMoreira70 ,

    Yeah, I agree with you. Based on the needs that you mentioned, I think there is no easy solution to achieve your needs.

     

    As an available solution, I think the extensive set of if clauses may be a choice for you. I think the solution I provided above could achieve your needs, please consider take a try with it.

     

    If you have solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

     

    Best regards,

  • CarlosMoreira70 Profile Picture
    6 on at

     

    Actually it seems more challenging than that. See below although I have French as my O365 language and it is picked up properly with language() the values retrieved from  Office365.CalendarGetTables().value are in english in this specific case. But in 365 Outlook it is in French. Language() does not seem to be the right function to retrieve the name of the calendar. I have other cases where language() returns en-US and the Office365.CalendarGetTables().value returns Kalender ???

    LangIssue.png

  • Gianluca Profile Picture
    68 on at

    @CarlosMoreira70 I'm struck at the exact same problem. Did you find a solution in the meantime? Thank you!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,027

#2
Valantis Profile Picture

Valantis 644

#3
11manish Profile Picture

11manish 626

Last 30 days Overall leaderboard