Is there a way to create your own date format?

Hi @tatiang, here is my project link:

https://x.thunkable.com/copy/17cbb4111bb99cf647296a195d7de431

Many thanks,

Andos.

Whoa… that’s a lot of screens! What is the name of the screen that you’re having problems with?

Hi @tatiang, it is my “FVAddNewScreen”.

Many thanks,

Andos.

1 Like

I see it. I think it’s called “MANFVAddNew”.

Yes, that is correct :+1:

Andos.

It’s referring to a data source that doesn’t exist, “MAN First Visits”:

image

Which Data Source?

“MAN First Visits”. Maybe that’s because I don’t have access to that Google Sheet. I’m going to try it with one of my own.

Ok :+1:

It is suppose to write data to MAN First Visits/FVENTRYFORM a row at a time but the “DATE” column is now always empty. I suspect, because the “DATE” field keeps disappearing before it can be written.

Andos…

But the date label has no connection to the Google Sheet so I don’t think that’s the problem.

Here’s a clue… when I add a vibrate block and test it on my iPhone, it doesn’t vibrate:

But I remove the set and update blocks, it does vibrate. So something is not working either in the Convert function or in the update value block.

1 Like

Also, I think part of the problem is that you are updating a row value when the date is picked but creating a row when the save button is clicked. So first you update the row – but there is no row yet – and then you create the row. I think you should not update the value until after the row has been created. And your create row block doesn’t have a spot for a date value… you have to make sure you have “DATE” as a column header in the Google Sheet before you add it to Thunkable. If you put it in after you added it, you need to re-sync your data source to your project.

Have I set the blocks correctly in the “Create row” block?

You’ll want to set it up like this:

When I use the Convert Date function and apply the result to a different label, the label disappears. This indicates an internal crash in the project. So there’s a problem with how you set up that function. And that’s part of why Google Sheets is blank.

Lots of problems here:

Please look carefully at my example and compare it to yours.

Some things I notice: you use app variable month twice but the second set block should be for the year. You are setting the stored variable email when it should be app variable date2 as DDMMMYYY. You are therefore returning a variable with a blank value because the function is not set up right.

My advice is this: before getting too complicated, make sure something simple works. Can you set a label to the result of the function and see the value you expect? That should be step 1 before you worry about Google Sheets or anything else.

I am going to change my blocks in the “AddRecBtnSave” blocks as per your suggestion.

The name of the Column in my Google Sheets is “DATE”.

What should I do with regards to the “Convert Date” function?

Hi @tatiang, I have change the “Save” blocks as suggested. See below:

and the Label stills disappears.

Andos.

Hi @tatiang, I am rectifying the errors in the Convert Date function. I noticed you have suggested using "app variable date2 and not app variable date. Why is this?

I’m talking about this variable:

image

Hi @tatiang, it now works beautifully! The errors “were” in my Convert Date function. I have used “app variable date” and “not app variable date2” because app variable date2 was created for the copy of my app.

Well done sir!

I do have a couple more questions to ask on this topic…

  1. On my app’s “MANFVAddNew” screen, I have just set my "DatePickerInputRow’s" visiblity to “false” because I only want the Date Picker to appear when the user clicks the Date Label (AddRecLabelBox). After he has entered his date, I wish for the “DatePickerInputRow” to disappear again. How would I do that? As you can see below, I have already created the blocks to make the "DatePickerInputRow’’ appears but how would I make it disappear after the user has selected a date?

I forgot to add the other images…

Before the user clicks on the Date entry box

When the users clicks the Date entry box the Date Picker Row appears

The user selects a date

After the Date is selected the Date Picker row is still visible.

Andos.

1 Like