AnsweredAssumed Answered

choose 1 of 4 sequentially

Question asked by tomswell on Jan 20, 2018
Latest reply on Jan 21, 2018 by tomswell

I'm trying to change textfield so that each change iteration chooses different color.

I arbitrary selected 4 as a good number as I don' t expect a usual calling for more than three changes in a session

     wrapping back around to 1 is ok but not likely

I can do with scripting a global value >   Set Field ( main::g_number;Case ( main::g_number = 3 ; 0 ;main::g_number+1)

    Choose ( main::g_number;  1 ; 2; 3; 4 )

but I want to keep it a "one liner" without calling a script

 

Set Field (main::PaymentLable ;

TextColor (main::PaymentLable;

Choose (Round( Random * 4 ; 0 ) ;

RGB (100;222;212) ; RGB (195;144;222); RGB(222;192;20) ; RGB(106;255;0) ))

 

this is pretty good but frequently selects same value

 

I'm guessing  utilizing MOD with LIST  function is a likely option but haven't wrapped my head around HOW as yet?

Outcomes