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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Adding/Editing SharePo...
Power Apps
Suggested Answer

Adding/Editing SharePoint List Text Column and Calculated Field Issue

(1) ShareShare
ReportReport
Posted on by 4
Hello,
 
I created a Gallery that allows you to update the "Employee Name" (Text Column), "Clock In" (Time/Date Column), "Clock Out" (Time/Date Column), and "Total Hours" (Calculated Field based on Clock in and out) using a form.
 
I have a button for EditForm, a button for NewForm, and a button for SubmitForm. All buttons work.
 
The form has the following datacards "Employee Name", "Clock In", and "Clock Out".
The "Employee Name" datacard was switched from a single line text field to a Choice field (where I added names under Items so supervisors didn't have to manually enter them).
 
Primary issue:
The selected "Employee Name" will not populate to the SharePoint list.
 
Secondary issue:
The "Total Hours" worked won't calculate the time additions/modifications from the form.
 
Can you offer a resolution to the two mentioned issue, please? 
 
 
Categories:
I have the same question (0)
  • BC-29081754-0 Profile Picture
    4 on at
    UPDATE:
     
    I figured out the name issue. I had an incorrect field selected for the "Employee Name" under the form. I still need a solution for forcing the Total Calculation to update.
     
    Any ideas?
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
     
    If I understand correctly, you wish to calculate the time difference in hours and then patch to SharePoint? I'd personally patch it as a Text value (if there's no reason to keep it as a DateTime field but your requirements could be different, do let me know). 

    I've tried to create something similar - 
     
    Here's how I am calculating the numbers and concatenating them which can then be patched to the SP. You could try to something else with this by taking the hours and minutes calculations out. 
    Concatenate(
        If(
            Dropdown1_1.Selected.Value > Dropdown1_3.Selected.Value,
            DateDiff(
                TimeValue(
                    Concatenate(
                        Dropdown1.Selected.Value,
                        ":",
                        Dropdown1_1.Selected.Value
                    )
                ),
                TimeValue(
                    Concatenate(
                        Dropdown1_2.Selected.Value,
                        ":",
                        Dropdown1_3.Selected.Value
                    )
                ),
                TimeUnit.Hours
            ) - 1,
            DateDiff(
                TimeValue(
                    Concatenate(
                        Dropdown1.Selected.Value,
                        ":",
                        Dropdown1_1.Selected.Value
                    )
                ),
                TimeValue(
                    Concatenate(
                        Dropdown1_2.Selected.Value,
                        ":",
                        Dropdown1_3.Selected.Value
                    )
                ),
                TimeUnit.Hours
            )
        ),
        " Hr, ",
        If(
            Dropdown1_1.Selected.Value > Dropdown1_3.Selected.Value,
            60 - Dropdown1_3.Selected.Value,
            Dropdown1_3.Selected.Value - Dropdown1_1.Selected.Value
        ),
        " Min"
    )
     
    I hope this helps you in some way. 
     
    Kind regards,
    Nandit

     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard