justinmind-logo
 
Upvote 1

Greater than condition not working

In Progress Waqas Zahid 4 years ago

I am trying to apply a condition for resizing a progress bar (percent complete), based on the value of data grid element.

My condition is:

WHEN percent-complete.value > 90 (resize bar to xxx px)

I have applied this to the On Page Load event, however it never works. Ideally, I would like to do multiple conditions for between number sets, such as:

WHEN percent-complete.value > 65 & percent-complete.value < 90

I can't even get the simpler one to work. Any help would be greatly appreciated.

Best Answer
photo

Here's an easier way - resize according to the value of the percentage and its percentage relative to a container. We placed the percentage rectangle in a dynamic panel. The event will resize the rectangle according to the percentage relative to the panel. For example, a percentage value of 90% resizes the rectangle to 90% of the dynamic panel.

Do the percentages in your Data Master contain the '%' sign? If so, the event won't work - they need to be plain numbers. We added another 'On Page Load' event that concatenates a '%' to the values so that they'll still appear as %.

Replies (3)
photo
1

It can be a little difficult to know why it's not working without seeing a reference file or image of all the elements on the screen. If possible, can you attach the file here so we can check it out? You can compress it to .zip/.rar format to attach it.

photo
1

Here are all the screen shots. I can't upload the solution files because it has customer logos, etc.

photo
1

Here's an easier way - resize according to the value of the percentage and its percentage relative to a container. We placed the percentage rectangle in a dynamic panel. The event will resize the rectangle according to the percentage relative to the panel. For example, a percentage value of 90% resizes the rectangle to 90% of the dynamic panel.

Do the percentages in your Data Master contain the '%' sign? If so, the event won't work - they need to be plain numbers. We added another 'On Page Load' event that concatenates a '%' to the values so that they'll still appear as %.

photo
1

Values in the data master are straight numbers, no % sign. Main issue is the event to resize never fires. If I add a resize event (without conditions) to a key up even, the resize happens, but On Page Load, it doesn't happen. It's like the page load event is happening before the data grid is loaded. I tried "On Panel Active", and that doesn't work either. There is no "Data Grid Loaded" event, so I'm not sure how this can be solved.

photo
1

If you add an "On Page Load" + "Pause" event before the "Resize" event, does the resize trigger at all?

photo
Leave a Comment
 
Attach a file