Maybe I have a problem with lookup. There you are :
Sheet-Golf: Golf-Name, Date-event,
a relationship with the
Sheet-Inscription: Golf-Name, Player name, Date-event, via Golf-Name.
When I display the Golf-Name via inlist (in the Golf page) I visualize all the registrations.
I created a creation button for a registration.
I would like to retrieve, display, the Date-event field of the Sheet-golf in the form I created, it is not the Form of Glide.
If I use Glide’s form, I can retrieve the date-event, but it’s a custom form with a lot more fields.
I am using my form because the Form Glide does not identify duplicates when I click submit.
Unless we can do a check before submit, but I haven’t figured out how to intercept the action of submit.
It might be very easy to do, but I can’t find any similar examples or issues on Community.
So I created a personalized form and a Lookup in the registration sheet to retrieve the date-event.
It works well, but I find all the event dates.
I know that when we have a multiple relation, we find all the elements in the lookup field.
But then how to do to have only one date-event?
How to do for a simple relationship?
Thanks for reading me this far, and thanks for your help.
When you say you are using your own form, are you referring to a Google Form, or a custom form in Glide? It’s easy enough to detect and prevent duplicates with Glide custom forms - check that example I linked to.
In terms of creating relations based on dates, the thing you need to understand is that a Glide date column will always be saved as a date and time internally, regardless of what its displayed as. So if you create a relation on raw dates you are likely to get unexpected results.
What you need to do is convert it to a “fixed” value. One option is to use an if-then-else column that returns a true/false result by comparing the date column to some other known value. Do that in both tables, and then create a relation between the two “boolean” columns.
Another option is to use a combination of math and templates columns to “lock” the date to a fixed format excluding the time, eg “yyyy-mm-dd”, and then use the template columns to create the relationship.
Thanks for help.
I use Custom Form.
I know how to detect duplicate, but in my case I have this
Golf-sheet (Gof-Name, date-event), date is in European form, I have two rows
Val Grand 16/09/2021, 09:00:00 (related Val-Grand Leonfort2)
Val Grand 16/09/2021, 16:00:00
This is possible to have multiple event in the same day at the same Golf !
Registration-sheet (golf-name, Golfeur-name, date-event), I create a registration (without date-event)
Val-Grand Leonfort2 : created
Val-Grand Leonfort2 : duplicate because the test is on golf-name, Golfeur-name)
So, I would hope to transfert the date-event from Golf-sheet to Registration-sheet to detect correctly duplicate row.
I guess my question would be why are you not collecting the date and tee-time with the registration?
Without that, I don’t see any way that you can prevent duplicates.
So what happens, does a user register with just a name and venue first, and then come back later and provide the date and start time?
I guess you could check for duplicates at that point. But what actually counts as a duplicate? If I have an existing registration at 9am on the 16th, and then I try to create another one at 9:05am on the same date, is that considered a duplicate? What about 10am, 11am, etc?
Whatever the case, it will be acheivable, you just need to have a clear picture of the requirements.
In my exemple there are 2 events. The date-time of registration event is not important.
I would to detect that the golfeur cannot register at the same event twice.
ah, I see.
Okay, so that’s easy enough. Just create a template that combines the event name and golfer name in your registrations table.
Then when a new registration is being created, create an identical template column that joins the new golfer name and event they are registering for.
Then create a relation that joins those two template columns.
If the relation is not empty, you have a duplicate.
Thanks, I’ll try and I tell you.
This is ok but without date-time.
I have an idea : when I click on bouton Registration I can copy to cliboard, by an action, the date-event.
Now, I don’t know how to retrieve this in registration form.
Have you an idea ? Are an action field to do this ?
Write to User Specific columns in your User Profile sheet. You can then use the values anywhere.