Convert Text to Hexadecimal

Hello
Does Tulip app can be able to convert Text to Hexadecimal ?

Among widgets available, I used :
Inputs (text)
Text (variable)

I would like to enter data on Inputs (text) and convert this data to hexadecimal on Text (variable).

Thanks to tell me if it’s possible

Kind Regards

François

hello @FTR, thanks for posting.

you can indeed do this conversion in Tulip. however, you will first need to convert the Text to an Integer before converting to a Hexadecimal. this Expression will work well (replacing the @Variable.Input to yours): int_to_hex(texttointeger(@Variable.Input)):

resulting App:

could you confirm this is indeed what you were looking for??

thanks again for posting!!

Hello Giovanni

Yes this what I would like but without a button trigger.

It’s written “Invalid Expression”

Thanks
François

It’s done but the result no matched

François

François

great to hear you were able to implement it.

could you confirm the following:

  1. does the Variable Texte Scanné have a value assigned to it??
  2. are you leaving and re-entering the Step??

@FTR, if you change your Trigger to being On Timer > 1 Second, the conversion should take place (assuming the Input Widget is the Texte Scanné Variable).

Hello Giovanni

1 - No value assigned but i linked my inputs (text) with DATA SOURCE = Variable and Variable = Text Scanné.
2 - I re-entering the Step (trigger = On Step Enter) = I used your condition description.

François

OK, thanks for clarifying @FTR.

based on my understanding, the only issue is that you don’t have a value assigned so the Variable can’t get converted. once you enter a value for the Variable and leave + re-enter the Step, it should convert to hexadecimal.

Even if I enter something on my Text (variable), I put the condition to convert to hexdecimal and I linked this to my inputs (text) ?

OK, could you share a screenshot of the Trigger you’re using @FTR?? thanks!!

Hello Giovanni

Sorry for the delay.

That’s the screenshot you asked me :

Thanks

OK, thanks for sharing @FTR.

I think the issue may be that you are storing the original Variable back to itself. could you try creating a new Variable, and storing the Expression to that Variable?? as you can see here: Convert Text to Hexadecimal - #2 by gio, the 2 Variables will need to be distinct.

Hello

I Did it but issue is still there

I changed the expression :


but it doesn’t take into account my text I wrote after TEXTTOINTEGER