I have made a flow on an object which creates the child records with copying its field value(Amount) to all the children. I also have a rollup summary which calculates the field values of all children and update and on parent record. Now When I update the child field(Amount) parent gets updated due to roll up summary and flow gets called which overrides the given value by user to parent's field value(Amount). How can I restrict it. Any help will be appreciated
You can do it through process builder. I have taken an example of Account-- opportunity. Since I can't create a Contact roll-up on Account.
a) Create a process builder for create or edit
b) The first criteria checks IsNew() and create the opportunity child record by copying the value from Account to opty.
c) The next criteria checks if the Amount field on Account is changed 'ISCHANGED(Amount)' , if Amount is changed , It updated all the child opportunity with new Amount.
Now let's come to your recursion issue. When I go and change the amount in opportunity, Rollup summary does updates the Account but Since the Condition 'ISCHANGED(Amount)' on account evaluates to false, Child opportunities will not be updated.
go to the advanced section in the Define Criteria for this Action Group and select yes "Do you want to execute the actions only when specified changes are made to the record"