cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
My_connect
Advocate II
Advocate II

Add default rows to associated table

Hi everyone,

 

In Model Driven app is it possible to automate "Add child rows when Master record is created ?"

 

Example

We have a Master table called "Vehicle" Primary Key auto number "V_01",

connected with an associated table "Activity" Primary Key auto number "Ac_01".

 

When users create new vehicle request in main form they add 5 Activities(5 rows) in associated table, so I was thinking if there is a way to create 5 default lines for every master record.

 

Any suggestions ? 🙂 

Thank you

4 REPLIES 4
StalinPonnusamy
Super User
Super User

Hi @My_connect

 

Yes, using Power Automate we can add activities records when vehicle record is created

 

  • Automated Cloud Flow
  • Trigger - When a row is added, modified, or deleted

Sample

StalinPonnusamy_0-1634431294182.png

 

Note: Change to Vehicle table instead of Account on this example

 


Thanks,
Stalin

Thank you @StalinPonnusamy .

But to add New Row Power automate requires auto number which is mandatory

I  guess i need to know last auto number in my table lets say "AC_22" and  +1 to make it AC_23  and loop this 5 times ?

StalinPonnusamy
Super User
Super User

Hi @My_connect 

 

Yes, If the auto number is your custom number then Get the latest number and increment one by one.

 

I recommend using the Dataverse Auto number that is easy to handle and unique.  In Dataverse, we have Autonumber field which generates based on a few combinations

  • Sequential format
  • Datetime
  • RandomString (Max 6 Char)

You can combine these 3 options to get 12 char lengths.

 

For example

{SEQNUM:6}{RANDSTRING:6} --> 001000QUKJIN
{DATETIMEUTC:yyyyddMM}{RANDSTRING:6} --> 20211410D344BG

 

StalinPonnusamy_0-1634604266216.png

 

 

StalinPonnusamy
Super User
Super User

Hi @My_connect 


Please let us know if anything needs on your post. We can help with this.

Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful.

Thanks,
Stalin - Learn To Illuminate

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,038)