ravel70
(Lance Marcin)
August 5, 2022, 1:53pm
1
I am trying to select the last day of the previous month on a pop-up calendar. I have a variable for the last day of the previous month, but can not get it to work in my ui selector. I have looked at many examples and tried them all to no avail.
The selector properties (for example) are as follows:
SyntaxEditor Code Snippet
I want to replace the ‘31’ with the lastDayofPreviousMonth variable. Have tried the following:
<webctrl aaname=’ ‘“+lastDayofPreviousMonth+”’ ’ type=‘button’ innertext=’ ‘“+lastDayofPreviousMonth+”’ ’ />
<webctrl aaname=‘‘“+lastDayofPreviousMonth+”’ ’ type=‘button’ innertext=‘‘“+lastDayofPreviousMonth+”’ ’ />
and a few others. What am I doing wrong. The variable is in scope.
Thanks.
Gokul001
(Gokul Balaji)
August 5, 2022, 1:56pm
4
Hi @ravel70
Can you share the Screenshot of UI explorer and the lastDayofPreviousMonth Value
For Dynamic selector
A dynamic selector uses a variable or an argument as a property for the attribute of your target tag. This allows the selector to easily identify a target element based on the value of the variable or argument, and not an exact string, which might...
Regards
Gokul
ravel70
(Lance Marcin)
August 5, 2022, 1:57pm
5
sorry, here is the original selector:
**not letting post the original for some reason, but where the variable is in the examples, there is a 31 with 13 spaces before and after.
ravel70
(Lance Marcin)
August 5, 2022, 2:01pm
6
original
daysInPreviousMonth
using above in selector with .toString
Gokul001
(Gokul Balaji)
August 5, 2022, 2:07pm
7
HI @ravel70
Try this selector?
Pass asterisk in place of empty space
<webctrl aaname=‘*{{lastDayofPreviousMonth}}*’ type=‘button’ innertext='*{{lastDayofPreviousMonth}}*’ />
Regards
Gokul
Gokul001
(Gokul Balaji)
August 5, 2022, 2:14pm
8
Hi @ravel70
Create a variable like this lastDayofPreviousMonth and pass the date
open UI Explorer in Click Activity and indicate on screen and check for “aaname” or “innertext” in the attributes
Right click on the value and choose variable as you have created in the starting if not choose create variable and create a new one
4.As you remember this is the variable i have created so choosing this
After Selecting it will become like his and works dynamically
Regards
Gokul
ppr
(Peter Preuss)
August 5, 2022, 2:18pm
10
just use the </>
button from the editor or screenshots as you had done
as you got told combining it with * will help
About the selector design, focus on following strategy:
make the selector as short as possible
make the selector as specific as possible
using aaname and innertext is redundant. So go only for the innertext and dynamize it with variable and wildcards
system
(system)
Closed
August 8, 2022, 2:36pm
12
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.