Mura CMS- How to display extended attributes using attribute set name - coldfusion-11

I have a couple attribute sets basically to display store hours. I have attribute set named as Sunday, Monday till Saturday. And each attribute set has 2 extended attribues named open and close which are dropdowns with values from 7 AM to 5 PM. since all the open and close attribute names will be same, I don't know how to access a particular day's (in my case attribute set) open and close fields.
E.g of what i am trying is
Attribute set name = Sunday
extended attribute name = Open -> values from 7AM to 5PM -> input name=open
extended attribute name = Close -> values from 7AM to 5PM -> input name=close
Attribute set name = Monday
extended attribute name = Open -> values from 7AM to 5PM -> input name=open
extended attribute name = Close -> values from 7AM to 5PM -> input name=close
and so on. All the open and close extended attributes have same name resp.
I want to know how to access a particular attribute set's open and close fields. I know I can keep the Label same and change Name but is there any way to access those with attribute set name.

I recommend to use unique names for extended attributes, even if they are in different attribute sets. Why don't you prefix the attribute with the day? mo_open, mo_close, tu_open, tu_close, ...

Related

UFT click an element based on a given property value

I'm working with a date selector, and I'm trying for my UFT script to pick an appointment date 3 days from today's date. I have set up that value specifically to match the property value format in the HTML code:
14
My question is: How can I instruct UFT to look for a property value by matching whatever is in the "aria-label" property with the value that I have defined in my data table?
Also, I noticed that the 'Tab index' is -1, not sure if that has anything to do
Much appreciated
I have the following code, but UFT does not recognize it "strAppointmentDate" is the cell in the data table where I defined the desired date:
iDate= strAppointmentDate
Set dd = Browser("Browser").Page("Select Appointment").WebButton("aria-label:=" &iDate, "html tag:=td", "index:=-1")
Instead of "aria-label" try "attribute/aria-label".

Kentico 12: change value of one page type field based on value of another field

I have a custom page type with two fields, StateName and StateCode. I would like it so that when a value is selected in either of these fields, the other field’s value changes to match.
So for example, if I select “Alabama” in the StateName field, the value of the StateCode field would automatically change to “AL.” Or if I select “CO” in the StateCode field, the StateName field would automatically change to “Colorado,” etc. Is this possible?
(I have to keep these as two separate fields, because I need to display either the state name or the state code on the front-end depending on context. Therefore, I can’t use a single field with options like AL;Alabama because then the field only returns the value AL and I have no way of getting the display name Alabama).
I know Kentico has options for setting “dependent” fields, but that only appears to determine visibility – e.g. only display Field B if I select a particular value in Field A. I can’t find a way to actually change the selected value in one field based on the selected value in another field.
Two control solution seems some kind of an overkill here. You can use StateInfoProvider to get what you want.
StateInfo state = StateInfoProvider.GetStateInfo("Alabama")
The other way would be to use a simple drop down control and use
query like that :
select stateCode + '|'+ StateDisplayName, StateDisplayName from cms_State
to get get code and display name as value separated by |

Quicksight parse date into month

Maybe I missed it but I'm attempting to create a dynamic 'Month' parameter based on a datetime field - but can't seem to get just the month! ? Am I missing something ?
here's my source DTTM date/time field -
In Manage Data > Edit [selected] Data Set > Data source
Just add 'calculated field':
truncDate('MM', date)
where MM returns the month portion of the date.
See manual of truncDate function
The only place in Quicksight that you can get just a month, e.g. "September" is on a date-based axis of a visual. To do so, click the dropdown arrow next to the field name in the fields list, select "Format: (date)" then "More Formatting Options..." then "Custom" and enter MMMM in the Custom format input box.
Quicksight menu selection as described
This will then show the full month name on the date axis in your visual. NB It will use the full month name on this visual for ALL time period "Aggregations" - e.g. if you change the visual to aggregate by Quarter, it will display the full name of the quarter's first month etc.
If you are talking about "Parameters" in the Quicksight analysis view then you can only create a "Datetime" formatted parameter and then only use the "Date picker" box format for this parameter in a control (+ filter).
If you use a calculated field in either data preparation or analysis view the only date functions do not allow full month names as an output, you can get the month number as an integer or one of the allowed date formats here:
https://docs.aws.amazon.com/quicksight/latest/user/data-source-limits.html#supported-date-formats
You'll need to hardcode the desired results using ifelse, min, and extract.
Extract will pull out the month as an integer. Quicksight has a desire to beginning summing integers, so we'll put MIN in place to prevent that.
ifelse(min(extract('MM',Date)) = 1,'January',min(extract('MM',Date)) = 2,'February',min(extract('MM',Date)) = 3,'March',min(extract('MM',Date)) = 4,'April',min(extract('MM',Date)) = 5,'May',min(extract('MM',Date)) = 6,'June',min(extract('MM',Date)) = 7,'July',min(extract('MM',Date)) = 8,'August',min(extract('MM',Date)) = 9,'September',min(extract('MM',Date)) = 10,'October',min(extract('MM',Date)) = 11,'November',min(extract('MM',Date)) = 12,'December','Error')
Also, I apologize if this misses the mark. I'm not able to see the screeshot you posted due to security controls here at the office.
You can use the extract function. Works like this:
event_timestamp Nov 9, 2021
extract('MM', event_timestamp)
11
You can add a calculated field using the extract function:
extract returns a specified portion of a date value. Requesting a time-related portion of a date that doesn't contain time information returns 0.
extract('MM', date_field)

how to change default settings for the new user (Vtiger CRM)?

When creating new user in Vtiger CRM lot of predefined settings (time zone, currency, etc.) are wrong form specific company setup. But I was unable to find info how to change in settings, nor with script, without getting too deep into file structure.
Is it possible (and how)?
To change the default value during entity creation, you need to change the order of values by setting the first value you want.
In vTiger each picklist has the values store in a table for example vtiger_time_zone for time_zone.
If, for example, you want to set the time zone to "Europe/Amsterdam" you need to find the corresponding value of the key field time_zoneid through query
SELECT * FROM vtiger_time_zone where time_zone = "Europe/Amsterdam"
In my case the corresponding time_zoneid returned by the query is 44.
At this point, it is necessary to change the sort order of the new desidered default value by excuting the query
UPDATE `vtiger_time_zone` SET sortorderid` = '0' WHERE `vtiger_time_zone`.`time_zoneid` = 44;
Finally, it is necessary that to move to the second position the option with time_zone = "Pacific/Midway" (time_zoneid = 1) by executing query
UPDATE `vtiger_time_zone` SET sortorderid` = '1' WHERE `vtiger_time_zone`.`time_zoneid` = 1;
Thew default currency value, instead, is given by the default value stored in $currency_name in config.inc.php and setted during the installation.
Yes you can change the Time Zone, Currency details from CRM GUI only without going into code. Just follow this simple steps.
Login to CRM with any user. After login you will see User Name or Image (If profile picture set) on top right corner. There you will get a link for "My Preference". Click on that link which will allow to change User wise Setting. This setting will be User wise so it will not take effect for other Users.
Cheers!!!!

adding date range to custom attribute magento

Is there any way to add a date range to a custom attribute (similar to that used for special prices and the "new" status of product) in magento? For example, I have a custom flag which tracks the status of a product. It would make it a lot easier if I could use a date range to set/unset that field.
(For example, when a product is marked as "coming soon" I add a tag to its image, which I manually unset once I make the product "new". Annoying to have to do it manually)
You will have to create 2 attributes that hold 2 dates. Them being:
New From: (Date Value)
New To: (Date Value)
Then, you will have to go into the file where you want the attribute to display, check to see if the date is within the range of today's date.

Resources