We are testing a Flex application using TestComplete Tool. The tool is able to recognize all the fields inside the Flex application. As part of this, we need to select dates (DateChooser object) for few of the fields in a Form.
Issue: We are selecting the date in the datechooser object by setting the "selectedDate" property.
fromDate.FlexObject.selectedDate = aqDateTime.Today
The selected date appears in the UI for the fromDate field.On submitting the form, we are getting error message as "fromDate field is empty".
Do we need to set any additional fields to register the selected date?
We are using VBScript as scripting language in the Test Complete Tool.
The problem is that a required event is not fired when the value is set programmatically (e.g. OnKeyPress or something like that). You need to make your test type the date to the field in order to make this event work:
fromDate.FlexObject.selectedDate.Keys "6/2/2014"
Related
I am trying to put together a mock up for a data collection app for a local nonprofit using GSuite's AppMaker. So far I really like the tool.
One thing I need to be able to do is streamline the data entry for the site representatives. In my app, I display a list of students in a table, where one of the columns is a boolean value which represents attendance. The desired result is for the teachers to be able to input the date field one time using the date input button at the bottom of the page. Then they can quickly point and click down the Present column to log attendance.
My question is: how would I link the date selector dropdown so that the date field pre-populates with the selected date from the input field? I don't want them to have to enter the field over an over again since its the same for each row and I don't want the user experience to feel clunky.
Screenshot of the App for reference:
Using client script, you can add the following to the onValueEdit event handler of the date widget at the bottom.
var items = widget.root.descendants.<YourTable>.datasource.items;
items.forEach(function(item){
item.<DateField> = newValue;
});
The only thing to take into account is that when using client scripting, you will only update the records loaded in the table at the moment; i.e, if your table has paging, it will only update the current page. If you are using paging, then you will need to add the following code to the onPreviousClick and the onNextClick event handlers of the pager widget:
var selectedDate = widget.root.descendants.<YourDatePicker>.value;
var items = widget.root.descendants.<YourTable>.datasource.items;
items.forEach(function(item){
item.<DateField> = selectedDate;
});
In App Maker, what is the simplest way to achieve the same result with a dropdown box that you can with a suggest box, which can return the whole record when you make a selection giving you the ability to assign associated record values to other fields on the page?
Consider a data model with three fields, (Code, Description, and Severity). Add a dropdown box to select the Code. Have the selection, (probably using onValueChange or onValueEdit), write the selected Code's Description to a label field beside the dropdown box. The Code's Severity will also be used to affect the style in some way like background color or something, but for this answer, merely assigning the value to a scripting variable will be good enough. It's the record value access and assignment mechanism I am after.
Clarification: This data model will not be the page's datasource. It is a secondary reference table used for assigning a code to a ticket. You can also assume that a record value will be written to a field in the page's datasource as well.
I would appreciate the simplest low code solution as we will have non-programmers attempting this. Thanks.
As long as you leave your value binding on the dropdown blank the following should work:
Set the options binding to:
#datasources.YourDatasource.items
You may want to consider changing the 'Names' binding to be the projection of a particular field in this datasource otherwise the values showing in your dropdown will only be the 'keys' from this datasource.
Then in your onValueEdit event you will gain access to individual fields like this:
var item = widget.datasource.item;
item.YourFieldToEdit1 = newValue.YourOtherDatasourceField1;
item.YourFieldToEdit2 = newValue.YourOtherDatasourceField2;
That would probably be the simplest way.
I'm Working with SSRS Report in CRM Then I have problem about DateTime Parameter before run report below.
First, I choose date from Datetime Picker below
Then TextBox show
In fact It's should show Only date But why it's show Date & Time
And after i Choose anything in parameter section Parameter always refresh and I surely I set automatic determine in .rdl file (from my experience its should not refresh)
Second, When I choose first date of month
TextBox show
Its show.
8-Jan-15
So My Question is.
Why Text Box show Invalid value.
Why its always refresh when i choose paremeter.
And How to fix it.
Thank you.
(I think I not happen for .rdl file)
I don't know CRM but in SSRS I would say
This seems to be a bug in CRM with using other date formats: https://community.dynamics.com/crm/f/117/t/138318
Parameters refresh in case other parameters are dependent on the previous parameter.
You can't fix the refresh, you can try changing your system date format but that's not a good fix. You can try this:
http://geekswithblogs.net/naijacoder/archive/2008/06/26/123422.aspx
I am trying do one of the following in the "Create Event" form in Plone 4, when creating events which happened in the past:
i. Set the default start/end dates in the "Start Date" and "End Date" drop-downs to a larger range of values (I cannot create events before 2001 or after 2016).
OR
ii. Allow users to input start/end dates for events as text (rather than select from a drop-down).
I can't seem to find what is controlling this form anywhere... after hours of googling!
The start and end fields are standard Archetypes DateTimeField fields, using the default CalendarWidget widgets.
The CalendarWidget reuses some fairly old and crufty calendar macros from Plone, and these read the range of selectable years from the site properties. You can change these in the ZMI, find the portal_properties tool, then the site_properties property sheet within that. The two properties to look for are:
calendar_starting_year
The starting year to show in the calendar widget. Default is 2001.
calendar_future_years_available
The number of future years, after the current year, to show in the calendar widget. Default is empty, and the widget then falls back to 5 years.
Also see the site properties documentation; you can also use a GenericSetup profile to set these.
These values apply to all usage of the calendar macros. You can also set this for just the event type, by setting the starting_year, ending_year and/or future_years properties on the CalendarWidget for the startDate and endDate fields. If you set an ending_year the future_years property is ignored.
Monkey-patch style altering of the event schema:
from Products.Archetypes.content import event
ATEventSchema['startDate'].widget.starting_year = 1999
ATEventSchema['startDate'].widget.ending_year = 2020
ATEventSchema['endDate'].widget.starting_year = 1999
ATEventSchema['endDate'].widget.ending_year = 2020
If the starting_year and ending_year are not defined on the definition level of the calendarwidget (inside the definition of the ATEvent schema implementation) then some assumptions about the year range is made inside
Products/CMFPlone/skins/plone_scripts/date_components_support.py
Modify the related code inside the date_components_support.py script.
I'm building a heavily CRUD based ASP.NET website and I've got to the phase of the project where I'm trying to build a search webpage that shows the user different subsets of a certain important table based on parameters they enter such as dates and different text fields.
I can't use a fixed SQL statement, because depending on whether they search by date or by something else, the SQL would be different, so instead I have been generating a results list using a table web control that starts out invisible and then is filled and set to visible once the user identifies a search they want to make. I used a table control because its easy to create and modify in the code behind, and I was able to make the needed calls to the database and populate that table as required.
However, the second thing I need with this search page, is the ability to allow the user to select a record from the results and then go edit it using the rest of the CRUD based pages on the site. To do that, I created asp:buttons in the table and gave them all different ids and the same event handler. But since I created the buttons dynamically, it seems the event disappears on callback and my scheme fails, so I'm taking a second look at how to do this.
My current code for the events looks like:
tempcell = new TableCell();
Button tempbutton = new Button();
tempbutton.Text = "Go";
tempbutton.ID = "gobutton" + rowN;
tempbutton.Visible = true;
tempbutton.Click += new EventHandler(tempbutton_Click);
tempcell.Controls.Add(tempbutton);
temprow.Cells.Add(tempcell);
My results table is declared like this:
<asp:Table ID="ResultTable" visible="false" runat="server"
GridLines="Both" CellSpacing="8">
</asp:Table>
I'd like to be able to identify which record the user selected, so I can send that info on to another page. And of course, I still need to be able to generate results for several different search criteria. Currently I have date, template and code based searches that lead to different stored procedures and different parameters based on what the user has entered.
Any suggestions on this? It seems like the data grids and repeaters require SQL statements in advance to work properly, so I'm not sure how to use them, but if I could then the item command approach would work with the buttons.
Your event will hook up successfully if the button is recreated in the page load event.
Otherwise, use a GridView. It is the perfect solution for simple CRUD, and you can control it as much as you need.