web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Filtering the column in a view based on a condition

(0) ShareShare
ReportReport
Posted on by 550

Hi,

I have to filter a column (not filter the whole view ,the data should display(Hide or Show ) in the column based on a condition in the related entity of the column  i.e Account)  in a view created in  entity(Device Equipment) . 

Can I use javascript in the view column for this type of requirement .

I have to only show the data (called depot group as a column in view (Related to Account entity) field present in Account entity)only when the Account Entity contains a Parent Account(Account is a Hierarchy )

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    Hide/show mechanism for columns in standard view based on condition is not possible. You can apply filters where the rows whose value you don't want to show should be filtered out. Alternatively, you can think of editable grid where you have the javascript events of that view handy.

    Sanchita

  • Henry J. Profile Picture
    5,237 on at

    It's not possible out-of-the-box.

    What's the functional reason, why do you need to hide this information?

  • HajiraRoshan Profile Picture
    550 on at

    Hi Jammes,

    It is given in my requirement , that I need to hide some data in the column based on some conditions related to the Entity record.

  • Suggested answer
    Henry J. Profile Picture
    5,237 on at

    OK but do we agree that if the user is going to click on the record, they will see the data anyway?

    You might be able to use Calculated Fields to do that.

    To simplify, let's say your view looks like this:

    - Device Equipment Name

    - Account

    - Parent Account (Account)

    - Depot Group (Account)

    You want to display the Depot Group data only if the Account has a Parent account.

    Can you tell me what kind of field is "Depot Group"?

    If it is a an Option-Set using a Global Option-Set, I would:

    Create a custom attribute on "Device Equipment":

    - Type: Option-set using a Global option-set

    - Calculated: IF Account "Parent account" contains data, then "Depot Group" = "Account > Depot Group" (Else: empty)

    Now you could also use a plugin firing on RetrieveMultiple and filtering the data, but that's a bit complex and it could impact performance.

  • HajiraRoshan Profile Picture
    550 on at

    Hi Jammes,

    Depot Group (Account ) is only a text field.

    Hajira

  • Henry J. Profile Picture
    5,237 on at

    Well it can work as well with a calculated field.

    Just a create a "Simple text field" custom attribute that is calculated on "Device Equipment" entity and apply the same formula.

    If that works for you don't hesitate to mark my reply as an answer.

    Thanks

  • Suggested answer
    ashlega Profile Picture
    34,477 on at

    Hi,

      you could probably do it with post-retrievemultiple plugin. Here is an example - I think they are doing almost exactly what you need there:

    community.dynamics.com/.../retrieve-multiple-plugin

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans