How to identify a dynamic id for drag n drop in cypress - drag-and-drop

I am using this plagin https://github.com/4teamwork/cypress-drag-drop
Here id is generating dynamically - so using id its not being possible to identify. What could be alternate ways?
cy.get('itemlocation').drag('target location')
Here I cant identify the target location as id is dynamic :(
Its actually one stack panel and it has 3 columns with dynamic ids. Full pic is click for detail

There's a few possibilities,
.drag('.cdk-drop-list') - if there's only one drop target
.drag('.cdk-drop-list:eq(2)') - 3rd drop target
.drag('designer-stack-panel:nth-child(1)') - only one stack panel, it's 1st child
.drag('designer-stack-panel:eq(1):nth-child(1)') - 2nd stack panel, 1st child
Ref :eq(), :nth-child()

Related

multiple column crystal report with two section with different data

i try to create table with two different details section
in left column show list of data
and in right column show different data
i try to use multiple column in details section but when use it can not set any controls in right side
in attached image
i need to set data in right side but not accessible and when add new section added below i need to set this section beside left section
like this

Showing comparison across groups in tooltip Tableau

I have a dashboard that lets users compare a company selected from a drop down menu (Company A) to another company chosen from another drop down menu (Company B). This then displays stacked bar charts (5 categories) by year. I want to build a tooltip so that when the user hovers over one of the 5 categories in either set of bar charts, it shows a comparison of that category between Company A and Company B. Is this possible, and if so, what is the best way to do this?
My previous answer showed a different approach for the problem without using too many workarounds. This answer will try to give exactly what has been asked.
First thing to understand is that you can't have the values for two different companies if you're filtering to show only one company. That means you'll need to circumvent this by filtering directly on the field.
Step 1: Create the new parameters that will be used as filters.
You want to create two parameters called "Company 1" and "Company 2" that will be used in each view to filter the company on the graphic.
Step 2: Create the new measures with the filter directly in the field.
Now you should create two new measures from your main measure, each one filtering one of the companies accordingly to the parameter, e.g. Sales Company 1 and Sales Company 2.
Step 3: Create a field with the variation and add it at the tooltip mark.
Simply enough, you want a calculated field with the difference between them:
SUM([Sales C1]) - SUM([Sales C2])
Step 4: Update the views and dashboard
Change the measure in each of the views for their following specific measure field, and remove the Company filter. And in the dashboard, substitute your usual filters to the parameter (which will be used to filter both views).
By assuming you have a dashboard with two views, you'll be filtering the [Company] in both of these views, making the value of another company not available to be shown at the tooltip.
If you're not using it yet, you could try a new approach and see the variance between companies by using the Color mark. By adding the [Company] as color, you could turn the Stack Marks off and add the second company in the filter to be able to visualize the difference.

SSRS - Pass parameter from one drop down menu to another

having a hard time phrasing the title. ok
I've got two attributes, parent and child. The report I'm building asks for these at the start, so I have two dropdown menus, we'll just say #parent and #child
now, parent only has 50 values to choose from, which isn't too bad. however, child has about 1000 - which is way too much for the dropdown to be effective. it's pulling all available options from that table
what I would like to do is when you select a row from parent in the dropdown, the list in the child dropdown updates
is there some way to pass the parameter around to do this? my last resort option is to put a table on the report that shows the child's available values and have them link to the report.. but ew, that's terrible.
for anyone who runs across this problem:
there are two queries, one for each dropdown
the child's query uses the parent's value from the parent's table - it updates just fine

Filemaker 12 -- display one value, store another

I'm building a database in FileMaker 12 that will, among other things, keep a list of jobs (indicated by numeric ID) and the employees who had billable time for that job.
Given three tables:
Employee ( empName, empID, salary, ... )
JobHours ( empID, jobID, hrsWorked, ... , refID)
JobCost ( jobID, expenses, profit, ... , refID)
Where:
Employee is my personnel roster matching names to numeric employee IDs and stats (salary, et al) ;
JobHours is a list of employee participation -- whenever an employee spends time on a job, this table has a line that shows their ID, the job ID, hours worked, and a few other things;
JobCost is a daily record of jobs. One entry in this table refers to the activity for a single job on a single day. Additionally, each entry gets a system generated unique ID (since neither jobID nor date is unique) to relate to JobHours (resulting in a list of who worked on a particular job on a particular day).
I have a form showing records from JobCost. For each record, I can see in a portal, showing records from JobHours, who worked on that job on that day.
Now, the issue.
In my portal, I want to have a drop-down list of employee names pulled from a value list to create records in JobHours with the following criteria:
1) I need it to be a drop-down rather than a pop-up so it will respond to auto-fill from the keyboard. A drop-down will show the secondary value (employee name) from a value list while dropped down, and will respond properly to keyboard autocomplete on the secondary value, but once you've made your selection, it only displays the primary value (employee ID).
2) I need it to display names, not IDs, at all times. The pop-up does this perfectly. However, it doesn't seem to respond to the keyboard for typing autocompletes.
3) I need to store the numeric ID rather than the name.
I know how to satisfy any two of these criteria at once, but that's all. The whole database is working beautifully otherwise. Is this behavior possible?
One common technique is to use two fields, one directly on top of the other.
On the bottom, put your JobHours::EmpID field. Set it up as the drop-down list with the value list that you've specified.
On top of the JobHours::EmpID field put the related Employee::EmpName field. Set the field so that it cannot be entered in browse or find mode.
Now your users will see the Employee Name, but when they click that click will go through the top field and into the Employee ID field where they will choose the name from the value list.
pft's solution is one that I have long used, but I do still find it inelegant because the user still sees an existing id number in the field when changing the value.
If the type-ahead is important, I would use the popup menu. Once the menu has been activated either by tabbing into it or by clicking into it, the user is able to type from the keyboard and the selection will change based on what's entered.
I came to this thread looking for a solution to this same issue (allowing the user to pick from a list, show their choice, but store a related value instead). For example, choose a plant species name from a dropdown, show the plant species name in the dropdown field, but have it store the taxonomic serial number (TSN; which is more likely to stay the same over the years). This is easy to do in MS Access, but took a litlte more messing around to do it in FMP12.
How I solved it:
I created two fields in the table that would be storing the values: Plant_TSN and Plant_SciName. A relationship must exist between the values in these two fields. In my case, I store a SciName for each TSN in a lookup table. I then created two fields in my layout, one for each new field.
For the value you wish to store (ex. Plant_TSN):
Make the corresponding layout field a dropdown and include the show/hide arrow. Edit the value list you will populate the dropdown with to show the second (reader friendly) column but store the first column value. In the layout shrink the field to only show the arrow.
For the field you wish the user to see (ex. Plant_SciName):
make the other layout field a Edit Box and prevent field entry in either Browse or Find mode. But it up against the dropdown arrow created in the previous step to make what looks like one field.
Finally, back in the first field (arrow-only drop down) write a script to push the user friendly number (Plant_SciName) to the edit box when the user-ugly (Plant_TSN) value is picked in the drop down. I used the OnObjectSave script trigger of the dropdown formatted field. Script should be something along the lines of 1) Freeze window, 2) Go to Related Record (based on relationship in lookup table 3) Set Field (i.e. the edit box) and 4) GotoLayout[original] to offset the Freeze.
Probably not an entirely clear explanation, but I bet you will get it on your third read through! I would have posted a screenshot, but I apparently need 10 "reputation points".
Cheers.

SSRS - group by on top of page

in Reporting Services when we group by one column we get the group in the left of the detail. Is it possible to make that group by in the top, just like in Crystal Reports?
Page 1:
Invoice A - name A (on top of page)
Detail 1
Detail 2
Page 2:
Invoice B - name B (on top of page)
Detail 1
Detail 2
I can only get
Invoice A - name A - Detail 1
Invoice A - name A - Detail 2
Invoice B - name B - Detail 1
Invoice B - name B - Detail 2
I've gotten this to work, but it's a pain.
First, make sure that your table is set to page break after every group.
Click on the box in the table that has the info you want to move to the top of the field (the name, the invoice, whatever) and get its name.
Wherever you want that data (i.e. in the page header), add a textbox whose value is =First(ReportItems![name].Value).
Unfortunately, that will leave you with the group heading still also present in the table. That's not necessarily a bad thing.
If you want to completely do away with that:
Stick your whole page in a List control, also set to page break after this element.
Set the List to group by invoice/name/whatever
Do the same as in the first option for the header
Put the table inside the list, with all grouping turned off. I can't remember right now whether you have to manually tell it to use the List's dataset; try the default first and see if it works.