Webserver SetOutValue

For general Flowcode discussion that does not belong in the other sections.
Post Reply
RGV250
Posts: 283
http://meble-kuchenne.info.pl
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 25 times
Been thanked: 32 times

Webserver SetOutValue

Post by RGV250 »

Hi,
Is there a technical reason why this value can only be a string, I would like to send mostly numeric data and find it a bit annoying having to convert to a string first, I seem to have more code converting the data than creating it.

Bob

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 503 times
Been thanked: 686 times

Re: Webserver SetOutValue

Post by BenR »

Hi Bob,

On the webpage where the value is displayed it will be as a string.

We could add a new functions allowing you to pass as an integer number or as a float if that would help.

RGV250
Posts: 283
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 25 times
Been thanked: 32 times

Re: Webserver SetOutValue

Post by RGV250 »

Hi Ben,
I know less about web pages than I do about Flowcode so might be overthinking it. In the future version of my project I would like to use web pages that are not embedded in Flowcode as mentioned at the end of this thread viewtopic.php?f=3&t=1420&start=20
If I do that I might need/want to use the variable directly, if it were a string I would have to convert it back which does seem wasteful codewise to me.
Perhaps it would be best to discuss with others before you go to the trouble for me if it is not really needed.

Bob

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 503 times
Been thanked: 686 times

Re: Webserver SetOutValue

Post by BenR »

Hello,

External or internal pages can request substitution OutValue strings in their HTML code by using %0 to request string 0 and %1 to request string 1 etc. %% allows you to print out a % character.

Creating the files and then reading them would also be possible but may create concurrency issues unless you are very careful about when the files are written and accessed.

RGV250
Posts: 283
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 25 times
Been thanked: 32 times

Re: Webserver SetOutValue

Post by RGV250 »

Hi Ben,
Thanks, I think you mentioned that before. I can see how it works for the internal pages but was not sure I understood how there was a link between the 2 programs.
Magic.jpg
Magic.jpg (15.08 KiB) Viewed 1870 times
I think here it is definitely beneficial (for me) if it were possible to have numeric/float variables instead of strings if that is possible.

Regards,
Bob

Post Reply