Graphics

 View Only
  • 1.  Visual Logic for various decimal point display 2

    Posted 01-14-2020 21:05

    Around June of last year I asked the question of how to show various options of displaying data, showing different amounts of digits after a decimal.  This question was asked for 3 options which Mignon Antoine was kind enough to help me with this Visual Logic

    This worked just fine.  Now, I would like to know how to add various options to this example.  Instead of only three options, I was wondering how to modify this example to include 2, 4, 5, 6 and 7 digits after the decimal depending on a text input. The number is data that comes in through an RSS feed.  Here is an example of what I would like to do:

    The letters on the left side (XYZ, /6E, /6B & /6J) are the text input to determine the amount of digits after the decimal I would like to display.  The number at the top of the page is an example of the incoming data through an RSS feed.  Any help would be greatly appreciated.  Thank you.



  • 2.  RE: Visual Logic for various decimal point display 2

    Posted 01-17-2020 09:04

    Hello Mark,

    this can be extended to more options by duplicating some blocs .

    For each new option :
    - add a new "format float" box and connect it to the next input number of the "input selector" (input [N] for example)
    - add a string compare , multiply it by the value N and add it to the "add bloc"

    here is an example with a new option ( N=3 )

     

    hope it helps,

    Antoine.


    #XPression


  • 3.  RE: Visual Logic for various decimal point display 2

    Posted 01-17-2020 14:37

    Thank you again Antoine! This makes sense, but I won't be able to try it until Tuesday. I'll let you know how I do


    #XPression


  • 4.  RE: Visual Logic for various decimal point display 2

    Posted 01-21-2020 13:51

    Antoine - 

    This works great!  Thank you so much!  I have one additional question though.  Looking at my data, I have 3 different symbols that require 5 places after the decimal,  2 different symbols that require 4 places, and 4 symbols that require 3 places.  Using this same logic, is there a way I could group the similar symbols into one block before it gets to the String Compare block - perhaps through an Input Selector?  It does work by continuing to add additional String Compare and Multiply blocks, but I was just trying to use less blocks to keep my Visual Logic window cleaner.  Thank you again!


    #XPression


  • 5.  RE: Visual Logic for various decimal point display 2

    Posted 01-21-2020 20:08

    you are right : you can group the similar symbols into one block using "or" logic bloc before each multiply bloc.

    here is an example for one of the option :

     


    #XPression


  • 6.  RE: Visual Logic for various decimal point display 2

    Posted 01-21-2020 20:53

    Once again Antoine, this works great.  I think this is all I need for this matter.  Thank you once again for your time and effort!


    #XPression