Can someone help me with my formula?

Hey everyone! I’m hoping someone can tell me what these errors mean?

This is a formula to dictate the width of a container. What’s strange is the example results are what I’m going for. But when I test it, every container end up the exact same size. I assume this has something to do with the yellow caution statements but I’m not sure what they are trying to tell me.

Thoughts?


Some resources to check before you post:

AppGyver Academy: SAP AppGyver Quick-Start

Troubleshooting FAQ: SAP AppGyver FAQ

Remove the % part. You should be creating a number.

Thank you, Phil. That makes sense. And it cleans up the formula to where there are no more errors. However, it seems to assume the resulting number is in reference to pixels rather than a percentage. Is there some way to change that?

It depends where you are putting the formula. Under the width settings you have options to choose percentage or pixels.

image

Right. But because I want it to be a dynamic value I am using the formula tab. But it isn’t obvious to me how to use the formula to read percent rather than pixels.

Does that make sense?

ok, so the formula option is in pixels. Just check the screen width and use that in your formula to give an effective percentage. So on your formula that is currently a percentage, add;
x systemVars.dimensions.screen / 100

Something I’ve been working on is something like a database or chart. Assuming I have 10 columns and the first five need to cover the screen left to right, I can either enter in the formula something like the viewport.Width and devided by 5 on each container width. They fit perfectly and when scrolling to end it also fits perfectly on any devise.

You can replace the “5” with a page veriable that holds a number either before, only use while testing or make it an option to change later.

I cant remember exactly the name since I’m using my phone but once you start Typing Viewport on formula bar, it will show you the available options. Choose the proper option.