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 / Facing an issue while ...
Power Apps
Suggested Answer

Facing an issue while patching 'Arrival Time' column in PowerApps using Dataverse

(1) ShareShare
ReportReport
Posted on by 145

Hi everyone ,

I am trying to patch a column 'Arrival Time', I have a custom dropdown I have created for noting down Arrival Time.

Whole form is a custom form.

I have referenced this article for creating both dropdowns for hours and minutes.

How to Use PowerApps Date and Time Picker? - SharePoint & Microsoft Power Platform Tutorials - SPGuides

CDN media

My Patch formula is as follow

Patch(
    Visitors,
    Defaults(Visitors),
    {'REQ ID': 
TextInput2
.Text},
    {'VISITOR NAME': 
TextInput2_1
.Text},
    {'VISITOR MOBILE NO': Value(
TextInput2_2
.Text)},
    {'VISITOR COMPANY NAME': 
TextInput2_3
.Text},
    {'PERSON TO MEET': 
ComboBox3
.Selected.DisplayName},
    {'VISIT TYPE': 
ComboBox1
.Selected.Value},
    {'VISIT DATE': 
DatePicker1
.SelectedDate},
    {'VISITOR STATUS': 
ComboBox1_1
.Selected.Value},
    {'REQ DATE': DateValue("12/01/2024")},
    {
        'ARRIVAL TIME': Time(
            Value(
Dropdown1
.Selected.Value),
            Value(
Dropdown1_1
.Selected.Value),
            0
        )
    }
)

The 'Arrival Time' column is a DateTime column , I have also tried this 

DateValue(Text(Today(),"dd mmm yyyy")) + Time(
            Value(
Dropdown1
.Selected.Value),
            Value(
Dropdown1_1
.Selected.Value),
            0
        )

and its not working , need help , I have been stuck on this for 2 days now.
Categories:
I have the same question (0)
  • Micky Profile Picture
    365 Moderator on at
    Hello,
     
    Try to replicate this way on how to Patch the ArrivalTime.
     
    Patch(
        ArrivalTimeList, // MainList
        Defaults(ArrivalTimeList),
        {
            Title: "Test",
            ArrivalTime: DateTime(
                Year(Today()), // Current Year
                Month(Today()), // Current Month
                Day(Today()), // Current Day
                //This condition is a workaround for PowerApps 24hours format
                If(
                    am_pmDropdown.SelectedText.Value = "PM", // check for AM/PM dropdown
                    hoursDropDown.Selected.Value + 12, // if PM then just add 12 hours to hoursDropDown value
                    hoursDropDown.Selected.Value // if AM then just paste the selected hoursDropdown
                ),
                minutesDropDown.Selected.Value, // selected minutes
                0 // this is the millisecond field
            )
        }
    );
     
    Regards,
     
    MMPoweR
  • P1999 Profile Picture
    145 on at
    Hi @MMPowerR,
     
    I used your formula , and its still saying the same. 
     
    I didn't have a ["AM","PM"] dropdown in my app. So for now I tried to do it in this way , and it still ends the same way. 
     
     
     
    I have my another app , where I did the same thing , even the configurations for dropdown , everything is same , and its works over there. 
     
    What i did is this was like this 
     
    Patch(
                'Visitor Details',
                Defaults('Visitor Details'),
                {'Visit ID': NewID},
                {'Visitor Name': TextInput3_4.Text},
                {'Visitor Mobile No': Value(TextInput4_2.Text)},
                {'BASF Card No': TextInput5_2.Text},
                {'Premise Card No': TextInput5_4.Text},
                {'Visitor Email': First(Office365Users.SearchUser({searchTerm: TextInput3_4.Text})).Mail},
                {'Visitor Company Name': TextInput3_5.Text},
                {'Office Location': Label21.Text},
                {'Person To Meet': ComboBox1_2.Selected.DisplayName},
                {
                    'Visitor Image': If(
                        Text(ComboBox2.Selected.Value) = "Employee",
                        Blank(),
                        First(Picture).Value
                    )
                },
                {'Visit Date': DateValue(Label15_15.Text)},
                {
                    'In Time': Time(
                        Value(Dropdown3_8.Selected.Value),
                        Value(Dropdown3_9.Selected.Value),
                        0
                    )
                },
                {
                    'Data Privacy Consent': If(
                        Checkbox3_2.Value,
                        [@'Data Privacy Consent (Visitor Details)'].Yes,
                        [@'Data Privacy Consent (Visitor Details)'].No
                    )
                },
                {
                    'Visiting Type': Switch(
                        Text(ComboBox2_4.Selected.Value),
                        "Meeting",
                        [@'Visiting Type'].Meeting,
                        "Official",
                        [@'Visiting Type'].Official,
                        "Personal",
                        [@'Visiting Type'].Personal,
                        "Others",
                        [@'Visiting Type'].Others
                    )
                },
                {'Visitor Status': [@'Visitor Status'].'Check-In'},
                {
                    'Visitor Type': Switch(
                        Text(ComboBox2.Selected.Value),
                        "Visitor",
                        [@'Visitor Type'].Visitor,
                        "Employee",
                        [@'Visitor Type'].Employee
                    )
                },
                {'Entry Method': "Assisted"}
            )
        );
     
     
    And this works too. But when I try repeating this in another app , it gives this error. :(
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
    Hi  Pranay123,
     
    For the Arrival Time, can you please try using this:
    'ARRIVAL TIME': 
    Today() + Time(Value(Dropdown1.Selected.Value), Value(Dropdown1_1.Selected.Value), 0)
    Hope this helps. 
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
  • Suggested answer
    timl Profile Picture
    37,152 Super User 2026 Season 1 on at
    Hi
     
    Given that Arrival Time is a Dataverse datetime column, the safest way would be to call the DateTime function and to pass the day, month, year, hour, and minute values like so:
     
    Patch(
        Visitors,
        Defaults(Visitors),
        {'REQ ID': TextInput2.Text},
        {'VISITOR NAME': TextInput2_1.Text},
        {'VISITOR MOBILE NO': Value(TextInput2_2.Text)},
        {'VISITOR COMPANY NAME': TextInput2_3.Text},
        {'PERSON TO MEET': ComboBox3.Selected.DisplayName},
        {'VISIT TYPE': ComboBox1.Selected.Value},
        {'VISIT DATE': DatePicker1.SelectedDate},
        {'VISITOR STATUS': ComboBox1_1.Selected.Value},
        {'REQ DATE': DateValue("12/01/2024")},
        {
            'ARRIVAL TIME': DateTime(
                Year(Today()),
                Month(Today()),
                Day(Today()),
                Value(Dropdown1.Selected.Value),
                Value(Dropdown1_1.Selected.Value),
                0
            )
        }
    )
    
     

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 875

#2
Valantis Profile Picture

Valantis 530

#3
11manish Profile Picture

11manish 432

Last 30 days Overall leaderboard