Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

Check with PowerFX whether file is added to form

(0) ShareShare
ReportReport
Posted on by 491

Hello everyone,

I try to disable a custom "send" button with PowerFX when a document (field with File Type) is not added to the form. I tried various options within the Visibility field:

  • !IsBlankOrError(Self.Selected.Item.FileAttachments)
  • !IsBlankOrError(Self.Selected.Item.Document)
  • !IsBlankOrError(Self.Selected.Item.Document.FileName)
  • !IsBlankOrError(Self.Selected.Item.Attachments)

But it doesn't seem to work.

Does anyone has suggestions?

Kind regards,
Elowy.

  • Suggested answer
    Inogic Profile Picture
    Inogic 24,102 on at
    Check with PowerFX whether file is added to form
    Hi @Slowytech,

    We also faced same issue with Power fx formula.

    But if you still want this functionality, then instead of Power Fx formula, you can go for solution using Ribbon workbench to disable the button if the document is not present.

    Below are the steps –
     
    1. Create one solution and add the entity in which you want to add the ‘Send’ button.
    Note- Don’t add anything else in that solution. It should only contain the entity in which you want to add the button.
    1. Open the Ribbon workbench and open that solution.
    2. Add the button in the main form and provide the name to that button.
    4. As you want to display the button if the file is present then add the ‘Enable Rule’ to that button.
    5. Provide the field logical name and then publish the solution.



    Result –

      When the file is not present then the button is hidden.



    When the file is present then the button is visible.



    Thanks!

    Inogic Professional Services
    An expert technical extension for your techno-functional business needs
    Power Platform/Dynamics 365 CRM
    Drop an email at crm@inogic.com
    Service:  https://www.inogic.com/services/  
    Power Platform/Dynamics 365 CRM Tips and Tricks:  https://www.inogic.com/blog/

  • Elowy GrootCRM Profile Picture
    Elowy GrootCRM 491 on at
    Check with PowerFX whether file is added to form
    Unfortunately not. I ended up with making the document field mandatory. And to prevent the button from being visible on a "new" form, I added the following to the visible condition of the button: "And Self.Selected.State = FormMode.Edit)" .
     
    Maybe that helps.
     
    Kind regards,
    Elowy.
  • JMG74 Profile Picture
    JMG74 2 on at
    Check with PowerFX whether file is added to form
    Hi Elowy,
     
    Did you get any solution or workaround on your side ? because we have the same concern and we didn't found any clue.
     
    Thanks in advance.
    Kind regards,
     
    Jean-Marc.

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans