How to change icon depending on datacard value?

  • How to change icon depending on datacard value?

    Posted by DSC Communities on April 15, 2020 at 2:30 pm
    • Michael Seto

      Member

      April 15, 2020 at 2:30 PM

      I have a datacard being displayed from a drop down that uses a field within an entity I have that can either be ‘Yes’ or ‘No’.

      On the same screen I have an icon. I would like the icon to be different depending on the ‘Yes’ or ‘No’ value of the datacardvalue.

      I tried the following in the ‘Icon’ property of the Icon:Ā If(DataCardValue30.Selected.Value=”No”, Icon.Draw)

      However, there’s an error on the equals sign that says ‘Incompatible type. We can’t evaluate your formula because the values being compared in the formula aren’t the same type.’

      ——————————
      Michael Seto
      Cloud Wiz
      ——————————

    • Michael Seto

      Member

      April 15, 2020 at 10:11 PM

      Anyone? Is this a tough one?

      ——————————
      Michael Seto
      Cloud Wiz
      ——————————
      ——————————————-

    • Warren Belz

      Member

      April 16, 2020 at 12:03 AM

      HI Michael,
      The issue I believe is in the piece.

      DataCardValue30.Selected.Value="No"?

      If this is a Boolean field in the data source and (I assume) you are using a toggle or checkbox, it should be

      DataCardValue30.Value=true

      Is this the case?

      ——————————
      Warren Belz
      Rockhampton Qld Australia
      +61 409 315 509
      ——————————
      ——————————————-

    • Mark Pearson

      Member

      April 16, 2020 at 12:39 AM

      I would look at two icons.Ā  When a change is made it sets aĀ  variable to true or false.Ā  If true, the visible of one is true,Ā  if false the visible of the other is true

      ——————————
      Mark Pearson
      National Operations Manager
      61409321547
      ——————————
      ——————————————-

    • Ujjwal Sharma

      Member

      April 16, 2020 at 1:30 AM

      It tried it on my end and it works.

      Are you sure the datacard is a drop-down and not a Combo Box?

      If it is a combo box then you have to useĀ If(First(DataCardValue30.Selected).Value="No", Icon.Draw)Ā  .

      ——————————
      Ujjwal Sharma
      Software Developer India
      Delhi
      ——————————
      ——————————————-

    • Peter Heffner

      Member

      April 16, 2020 at 1:41 AM

      Michael,
      I think there is still any issue filtering Sharepoint lists with a boolean field. It always returns false.
      This is why I use text fields writing true/false or Yes/No as a text value.

      Working with Sharepoint and SQL servers I have seen true/True/1 and false/False/0
      When using toggles or checkboxes or dropdowns I often add a label to display the actual value of my selection just to reduce troubleshooting time.
      I hope this helps.

      ——————————
      Peter Heffner
      Intranet Solution Specialist III
      ——————————
      ——————————————-

    • Brent Mason

      Member

      April 16, 2020 at 10:36 AM

      Could this be the magic line for which you are looking?

      I added this to the ICON property of the icon:Ā If(Dropdown1.SelectedText.Value = “yes”, Icon.Draw, Icon.Airplane )

      This swaps between the Draw and Airplane icons based on the “yes” or “no” from the dropdown.

      ——————————
      Brent Mason
      Project Manager
      5037995914
      ——————————
      ——————————————-

    DSC Communities replied 5 years, 11 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘How to change icon depending on datacard value?’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!