Skip to main content
Question

Create a Button to Change a Date Field

  • September 29, 2017
  • 0 replies
  • 160 views

I would like to have a Button that will update a Date Field with the Current Date. This would update all the Records with the Current Date. Is this Possible?
This topic has been closed for replies.

When you say "all the records"  - Which Records?

  • Author
  • Registered
  • September 29, 2017
Ok, I have a table that I want to affect each record in that table meaning a Modify.  So I might have 20 records in the Table and I have a Generated Date.  I want to have a Button that will Loop through all 20 records and update the Generate Date with Today's Date.  

Possible?

So if the table has 1000 records, you want to update all 1,000 records?  Or do you really mean that you have a report with 20 records out of 1,000 records and just want to update those ones.

  • Author
  • Registered
  • September 30, 2017
Yes, I am focused on updating the Table.  Maybe the most it will have is 100 records.  

How about Grid Edit.
Let's start low tech.

Go to Grid Edit.
Put a T for today in the date field.
Click on the column heading to highlight the column,
Right click to Fill down,
Save

  • Author
  • Registered
  • September 30, 2017
Yes, I can do that.  Maybe that's the easy way for now.   

  • Author
  • Registered
  • September 30, 2017
This works ok.  Thanks. 
Would be nice to have a Button to call an Action to handle this.  
Fewer Steps.  
Thanks for the Help.

It is possible to make a button to do that.  Contact me via the information in my profile if you want assistance with that.

Basically we would use API_RunImport to import the records into themselves and update that 1 field and then land the user on the Table Home page. 

Attached is a screenshot of applying a console script to change the date of all records in a query. This can easily be implemented as a button and you are free to try it in the Mass Update application by changing the date in the script.

https://i.imgur.com/Yyw928H.jpg


Mass Update
https://haversineconsulting.quickbase.com/db/bm5hy8d2z

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=604

  • Registered
  • September 30, 2017
Another option is to use the "Search & Replace" option.  When you have a table report pulled up, you can apply any filtering you'd like. 

Then select the "more" menu option and "Search & Replace".

This would let you pick the field and mass update.

(small caveat is that you have to search for a particular value to replace, so grid edit might work too)
Just wanted to give you another idea. 

Would this "link" be similarly used to create a button field on each record individually to change the field value of say a status text field/dropdown. Click button - sets field to Active/Inactive for instance. As a toggle....?

Please post this as a new question.