cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
raneesh_mr
Regular Visitor

By clicking "Check out" current date and time need to enter in column and save

By clicking "Check out" button Current date and time need to enter in "Time Check-out" column in SharePoint and save.

 

By clicking "Check out" button Current date and time need to enter in SharePoint and save.By clicking "Check out" button Current date and time need to enter in SharePoint and save.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi@raneesh_mr,

Could you please make sure that the corresponding ID to the 'Time Check-out' is "1" or other ID?

I have tested it again and the date-time is patched successfully.

As an alternative solution, you could try the following steps.

Create an app via the SP list directly, and then you could get 3 screens: BrowseScreen containing a Gallery, DetailScreen containing a DisplayForm, EditScreen containing an EditForm.

  1. Click the Edit button and it will navigate you to the EditScreen.
  2. Set the Update property of the 'Time Check-out' data card as:  Now()
  3. Click the Submit Button

After this, once you click the submit button, the 'Time Check-out' column will be updated with the current date and time.

Hope it could help.

Best Regards,

Qi

 

 

View solution in original post

4 REPLIES 4
eka24
Super User III
Super User III

Use the Patch function;

Patch( Datasource,
Lookup( Datasource, IDNumber= Value(TextBox1.Text)), {TimeCheckOut: TimeCheckOutTextbox.Text} )

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

v-qiaqi-msft
Community Support
Community Support

Hi@raneesh_mr,

Based on the issue that you mentioned, do you want to patch the check-out time to the SP list?

Could you please share a bit more about the "Time Check-out" column type:

  1. is it a Text or a Date and Time?
  2. is it an empty column or already populated with time?

If my understanding is correct, you want to update the "Time Check-out" column by clicking the button and I assume that "Time Check-out" is an empty column, please try the following workaround.

>> If the "Time Check-out" column type is a Text.

Set the OnSelect property of the Button as below:

 

Patch(Approvers,LookUp(Approvers,ID=1),{'Time Check-out':Text(Now())})

 

Set the Text property of the Label corresponding to the "Time Check-out" column as below:

 

ThisItem.'Time Check-out'

 

 >> If the "Time Check-out" column type is a Date and Time.

Set the OnSelect property of the Button as below:

 

Patch(Approvers,LookUp(Approvers,ID=1),{'Time Check-out':Now()})

 

Set the Text property of the Label corresponding to the "Time Check-out" column as below:

 

ThisItem.'Time Check-out'

 

Note: 'Approvers' is my SP list name. You can replace it with yours.

Hope it could help you.

Best Regards,

Qi

 

 

 

Hi @v-qiaqi-msft 

 

The 'Time Check-out' column is date and time in SP.

The column is empty and the date and time need to update in SP upon clicking the button.

 

I updated below steps there is no error messages but the data is not updating in SP. I think ID=1 is not recognized, I'm going to place this button on the DetailScreen of Power App, and the date and time need to update in the opened item in the SP.

 

Patch('Visitor Log',LookUp('Visitor Log',ID=1),{'Time Check-out':Now()})

Hi@raneesh_mr,

Could you please make sure that the corresponding ID to the 'Time Check-out' is "1" or other ID?

I have tested it again and the date-time is patched successfully.

As an alternative solution, you could try the following steps.

Create an app via the SP list directly, and then you could get 3 screens: BrowseScreen containing a Gallery, DetailScreen containing a DisplayForm, EditScreen containing an EditForm.

  1. Click the Edit button and it will navigate you to the EditScreen.
  2. Set the Update property of the 'Time Check-out' data card as:  Now()
  3. Click the Submit Button

After this, once you click the submit button, the 'Time Check-out' column will be updated with the current date and time.

Hope it could help.

Best Regards,

Qi

 

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (39,378)