Getting sequence of associated Product - IBM - javabeans

I want to get 'Rank' value from MASSOCCECE table, since past 2 days I have been searching a lot to get this value but failed I tried 'ProductDatBean', 'RelatedProductDataBean' but couldn't figure out how to get the value of 'rank'.
I have four products as cross-sell of a product and I want to sort them on the basis of 'rank'.
It would be a great help if anyone could tell me how to get this value besides using customized bean.
EDIT: For more clarity, adding my code
<wcbase:useBean id="g_mA" classname="com.ibm.commerce.catalog.beans.ProductDataBean" >
<c:set target="${g_mA}" property="productID" value="${catentry_ID}" />
</wcbase:useBean>
<c:set var="g_associatedProducts" value="${g_mA.productCrossSells}" scope="request"/>
<c:forEach var="associatedProducts" items="${g_associatedProducts}" varStatus="status">
${associatedProducts.rank}
</c:forEach>

Got the value, thanks everyone for responses.
I was doing the right thing (${associatedProducts.rank}) for getting this value but I was misguided a little , They were items that were associated and I was informed that they were Products, so getting blank while implementing this logic for Item. Used ItemBean now everything is working fine.

Related

PrimeVue: Table Column Alignment is not consistent

I'm trying to get all the columns and their headers to align:
But everything seems to have a mind of its own and I get this:
The code I am using is pretty simple:
<DataTable
:value="someValue"
responsiveLayout="scroll"
:scrollable="true"
scrollDirection="both"
class="p-datatable-lg"
scrollHeight="500px"
>
<Column field="field1" header="Service"/>
</DataTable>
I've tried a host of things, namely setting the width of a column like so:
style="min-width:200px"
The current solution is to simple remove scrollDirection="both" which results in this:
We want to prevent that word wrapping because it is hard to read.
But that also results in misaligned columns. Has anyone faced this issue and how did you resolve it?
Thank you!

Reporting Services Error?

When running a report in preview I get the following error The definition of the report is invalid , the tablix 'Tablix11' contains an invalid TablixMember. The sort Expressions element is not allowed if Group is omitted.
I have never come across this error before and cant understand what is causing it.
The error can be replicated by creating a simple Tablix and looking at the underlying XML.
When you create a Tablix with a group, the underlying RDL XML will include something like this:
<TablixRowHierarchy>
<TablixMembers>
<TablixMember />
<TablixMember>
<Group Name="Group1">
<GroupExpressions>
<GroupExpression>=Fields!val.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!val.Value</Value>
</SortExpression>
</SortExpressions>
<TablixMembers>
<TablixMember>
<Group Name="Details3" />
</TablixMember>
</TablixMembers>
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
If you remove the entire Group element, this will give the same error you're seeing:
If you also remove the SortExpressions element this will allow the report to render without error.
However - it's impossible for me to say how your RDL file got in this state in the first place. Given that hacking XML to get things running is seldom a good idea, my recommendation would be to start the tablix from scratch instead of hacking things to a working state - you might just be introducing more problems.
But at least hopefully now you can see why the error might be occurring.
I found that the Tablix header had a textbox property containing interactive sort. This text box is in the header, and not part of the detail. When I deleted the field from the detail of the tablix, the interactive sort remained on the textbox in the header.
Changing it on the header by right clicking on the header textbox of the tablix, then selecting textbox properties, then selecting "interactive sorting", and then correcting the "sort by" value to the correct field name did the trick.

Selenium IDE - Enter values in to dynamic fields

So first time posting, and I am not even sure Selenium IDE can handle what I want.
So on the web page I have 10 quantity fields (its a simple e-commerce site)
And I want to populate these 10 Quantity fields with values, however the id of these Qty fields can change.
e.g
Command Target Value
type id=qtyField_124098 1
type id=qtyField_124099 2 etc.
Is there an easy way to represent the Target by position. So I could put a value of 1 into the first Qty field, and 2 into the second Qty field.
Your best bet is to change your locator from the id to xpath. As such you could use something like //input[n] but obviously you'd change based on what is the actual xpath value for those fields.
EDIT:
With an example:
<div>
<input> </input>
<input> </input>
</div>
To reference the first <input> yourxpath` would be
//div/input[1]
the second would be
//div/input[2]
Obviously, in most cases xpath expressions will be more complicated than that but hopefully this gives you a starting point.
As this code helps me to find values dynamically and helped me, hope it will also help you
click name=cmb_text_xxx
mouseOver css=a:contains("xxx")
mouseDown css=a:contains("xxx")
click css=a:contains("xxx")

Shopify: Is it possible to find a product by sku number?

The data that I'm getting only contains the SKU numbers. I am trying to figure out how I can link these SKU numbers to the product variants in Shopify without the actual product id number.
Example data:
<Inventory ItemNumber="100B3001-B-01">
<ItemStatus Status="Avail" Quantity="0" />
</Inventory>
<Inventory ItemNumber="100B3001-B-02">
<ItemStatus Status="Avail" Quantity="0" />
</Inventory>
<Inventory ItemNumber="100B3001-B-03">
<ItemStatus Status="Avail" Quantity="-1" />
<ItemStatus Status="Alloc" Quantity="1" />
</Inventory>
<Inventory ItemNumber="100B3001-B-04">
<ItemStatus Status="Avail" Quantity="-1" />
<ItemStatus Status="Alloc" Quantity="1" />
</Inventory>
Here's a delightful, condescending discussion from Shopify employees in 2011 asking why you can't just store the Shopify ID everywhere. The "stock-keeping unit" is a universal systems integration point and, in every system I've seen, each SKU uniquely maps to a product because words have meaning, but apparently not at Shopify.
Three years later, you seem to have two options.
One is to create a Fulfillment Service and provide a URL where Shopify will call you asking for stock levels on a SKU; this is probably the simplest solution, provided you have a Web server sitting somewhere where you can expose such a callback.
The second is to periodically page through all of the Products and store a mapping of the Shopify ID to a SKU somewhere, consulting your map when you need to do an update. Because most of our integrations are cron jobs and I'd like to keep them that way, I periodically ask for the products that have changed since the last run, and then update my mapping.
As David Lazar points out in his comment, the ability to find a product based on its SKU is not currently supported in the Shopify API.
EDIT: This is an unreliable option that I once used as a last resort. I wouldn't recommend using this but I will leave it here in case as someone may find it helpful.
You can use this API endpoint:
/admin/products/search.json?query=sku:abc123
I have only used it in the browser though, and I can't find any documentation for it. And it may stop working at any time.
You can use
*.myshopify.com/search?view=json&q=sku:SKUID
Graph query on Shopify works for me:

Changing the ALLOWEDVALUES in tfs2010 to a AD group

I have a little problem with a work item.
My goal is to change the <ALLOWEDVALUES> of a work item to an AD group, so that not all "ValidUsers" can get a work item assigned. For this I've created a new TFS group "TFS_AssignGroup" and added the AD-group (AD-TFS_AssignGroup) to it.
Now I've changed the work item type definition:
<FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
<HELPTEXT>The person currently working on this bug</HELPTEXT>
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
<LISTITEM value="[project]\TFS_AssignGroup" />
</ALLOWEDVALUES>
</FIELD>
Now I expected, that the AssignedTo-field only shows the people, who are in the AD-group. But it actually only shows me the AD-group itself. So I have exactly one entry in my AssignedTo-field: AD-TFS_AssignGroup.
Any idea?
Ok, that was an easy one: It just took some time to get the data from the AD. So the solution is to do nothing and wait (or restart the TFS server).