How to add same data to each row by incrementing the date column

Hello,

I have sessions table that contain these columns:
Group, Teacher, Classroom, Start of the session, End of the session, Date of the session

Let’s say I want to create a session with Group “A”, Teacher “A” in Classroom “1”, from “9 to 11 am” on Friday April 17, 2020

What’s the best way to create same sessions with differents dates for 16 weeks (April 24, May 1, May 8, May 15, … until July 31) without having to fill the form again and again for each date

Thank you

@Amine,

You may wish to try following approach. Here you will be able to copy the latest record for a given combination (Group, Teacher, Classroom, Start of the session, End of the session) by using an action and then simply save it back without filling in a single field. However you will need to manually tap on “Copy Record” action everytime you want to create a new record.

  1. Please create a LINKTOFORM() action on the form and table wherein the above information is stored.
    The LINKTOFORM() expression will look something like LINKTOFORM(“Your Form View Name”, “Group”,[Group], “Teacher”,[Teacher], “Classroom”,[Classroom], “Start of the session”,[Start of the session],“End of the session”,[End of the session])

  2. In the “Behavior” setting of the action , you may have following condition for the action
    [Date]=MAX(SELECT(Table Name[Date], AND([Teacher]=[_THISROW].[Teacher], [Classroom]=[_THISROW].[Classroom]… ))) Basically all those conditions that you wish to have constant except for the [Date]

This condition will ensure that the action is always available to only the latest record for that combination. Make this action inline and attach it to a column. You may create a text column simply to attach this inline action.

  1. In the date column, please have an initial value as MAX(SELECT(Table Name[Date], AND([Teacher]=[_THISROW].[Teacher], [Classroom]=[_THISROW].[Classroom]… ))) +7
    This initial value will prepopulate the date column with next week’s date when the user taps on action “Copy Record”
    I believe you will alsoneed some more valid_if statements to ensure a classroom , session and calssroom, session, teacher combination is not duplicated.

A screenshot of the test app is shown below, with inline actions attached only to the latest records.

3 Likes

These additional references may help you just in case you have not yet eferred these

https://www.appsheet.com/samples/This-app-shows-how-to-link-to-a-form-and-fill-in-default-values?appGuidString=ad497f8e-7d8a-4664-8a4a-43c202bb6126

2 Likes

With such explanation, you can’t miss your goal
many thanks to you

2 Likes