Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Workflow to display in form number of rows that have same data in same entity

Posted on by 40

I have data that is loaded into the system from a 3rd party data set, they have a reference number which can be added against more than one line of data. 

I need to count the number of times the field is populated with the same data and display it on that rows form display.

Example:

I have 3 rows of data the field called Reference shows as 12345a in 2 rows of data and 12345b in the third row.

I need a field to display the total count of all rows that match that fields reference code against each row

so the field on both rows with 12345a will show as "2" and the row with the reference set as 12345b will show "1" in the count field.

I need to do this using a workflow or rollup/calculated field. i cant use a plug in.

Any help much appreciated.

Thank you

Colin

  • Verified answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Workflow to display in form number of rows that have same data in same entity

    Colin,

    I would recommend to get in touch with tool's author, Alex. I believe he knows his tools better.

  • Colin365Bell Profile Picture
    Colin365Bell 40 on at
    RE: Workflow to display in form number of rows that have same data in same entity

    Thanks for the replies, i have been trying to use Custom workflow using Attribute setter in TCS Tools but i cant get the look up field to populate it says i cant do it due to being a string pushing into a lookup?

    Any ideas?

    the error i get is below;

    Error setting attribute value for new_fieldnamecount. Error converting attribute value to Property: Attribute [new_fieldnamecount], Attribute type [lookup] of Entity [new_entity] with value of type [System.String]: [System.InvalidCastException: Unable to cast object of type 'System.String' to type 'Microsoft.Xrm.Sdk.EntityReference'. at Microsoft.Crm.BusinessEntities.LookupPropertyConverter.InternalFromEntity(ICrmConversionContext conversionContext, AttributeMetadata attributeMetadata, Object value, String formattedValue) at Microsoft.Crm.BusinessEntities.PropertyConverterBase.<>c__DisplayClass7_0.<FromEntity>b__0() at Microsoft.Crm.BusinessEntities.PropertyConverterBase.InternalConvertFrom[T](Guid orgId, AttributeMetadata attributeMetadata, Object value, Func`1 converterFunction)]

    do i need another custom section to convert string to lookup?

    As always thanks in advance for replies.

  • David Carr Profile Picture
    David Carr 45 on at
    RE: Workflow to display in form number of rows that have same data in same entity

    You might try looking at Power Automate (a/k/a flow).  You could trigger the flow on the insert of a record.  You could use a List Records action to find all Records with that same Reference#.  Then, in the List Records loop, you should be able to update each record with the count.   Hope this helps,

    Dave

    President, Visionary Software Consulting

    hhtp://crm-rules.com

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Workflow to display in form number of rows that have same data in same entity

    Hello Colin,

    I'm afraid you will have to use either plugins or custom workflow steps to implement your requirement because it doesn't look like to be doable using OOB functionality. I'm sorry.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans