Validating that an Item is in the list

Hello Everyone,
I am new to Adalo. I am trying to do something very simple, but proving to be increasingly difficult in Adalo (for me at least). I have a table Managing a certain kind of Subscription. The subscription is managed between a start date and an end date specified in the table, however the subscription is related to list of week days where the user wants to receive the service. This then should add a job in a Jobs table for each day in that date range matching the selected weekday. I am able to loop through the date range and execute the insert operation for each day. I am also able to identify the weekday of the date being processed. the issue for me is having adalo check is the string “Monday”, let’s say, is in the related list field in the subscription that may contain the “list” (Monday, Wednesday, Friday). As Shown Below.

I hope that makes sense.

Hi @mohebgeorge,

Welcome to the community :partying_face:

You need to check if the current day is there in the Days property? Or you need to add the Days property values to the Selected Days property as comma separated?

Thank you

I am trying to check if the selected days (which should read “Selected Day”) exists in the “Days” List.

How you are selecting days? Can you show some screenshots?

Days Selection large

Thanks for the GIF!

How you want this to be? Like you select the day and it writes on this Selected Days property show a message if that select date is in the Days rel property? Some additional questions to get this correctly : What is this property? In which collection this located?

After the user selects the start and end dates and after they select the days (all on a subscription table), the app would go to two different screen where I start and the start date and iterate through the days until I reach the end date. As this happens, Records are being added to another tables (jobs) based on the current date of the process. I am not trying to remove the record (or not add it at all) if the day of the week of the currently added date is NOT in the selected list of days. The way I am doing this technically is this: I have a date field and a text field on my original table (subscription). I set the date field to be the start date initially and the weekday is simply the weekday value of that date field. On the other screen where I iterate through the dates, I add new records to the Jobs table and update those two fields on the Subscription (this part workd), My hope is once I can validate that the current day is not in the selected days, I would simply delete the latest Job from the Jobs table.

I hope this made sense.

Hi @mohebgeorge,

I’m a bit confused :grimacing:

You have a the selected days text property and a many to many relationship property ( I’m not sure with what collection ) on the subscription collection. Then when you come to the screen where you create jobs you have a list that can select days and it writes to the selected days property and add that in the relationship also and then if the selected day is not in the relationship then create and if it is not create?

Is it possible to explain what you wanted to do from a video showing your current setup and preview? ( You can use Loom )

Thank you