Get value of array in variable in vb - arrays

ShoppingProductCard get all value when i expand it look like
In this i want to get value of all items(Quantity,fkproductID etc) in variable.
please help

Im not 100% sure what the problem is
Dim ID as Integer
ID = shoppingProductsCart(CartID).fkFrequencyAutoshipTypeID
is this what you wanted? (CartID in your Case would be 0)

Related

How can I auto fill a formula with dynamic value in array in the same cell?

so I have a formula inside an array that looks like this
={CRYPTOFINANCE("kraken:"&ARL8&"/USD", "price_history", "10d")}
I want to auto fill the array with the same function but with the 'ARL8' reference in an ascending order, just like auto filling cells, but keep it all in one cell it should look like this...
={CRYPTOFINANCE("kraken:"&ARL8&"/USD", "price_history", "10d") ; CRYPTOFINANCE("kraken:"&ARL9&"/USD", "price_history", "10d") ; CRYPTOFINANCE("kraken:"&ARL10&"/USD", "price_history", "10d")} ,SUBSTITUTE(TRANSPOSE(SPLIT(REPT(12,1050),2)),1,"MISTAKE")) etc.
the thing is that I have about 1000 values from ARL8 reference to ARL1008 reference so it will take really long for me to write it all manually, so is there a way I can keep the rest of the function but have the ARL cell reference dynamically written while being able to specify the length of the array?
It's something I am struggling for a while now and still couldn't find a way so I really appreciate if you could explain the solution as well, and if there is more info I can give let me know, and thanks.
I tried a few things but they gave me different errors I didn't know how to solve and others just didn't work, I will just put it in case it helps
=ARRAYFORMULA(CRYPTOFINANCE("kraken:"&ARL8:ARL1008&"/USD", "price_history", "10d"))
the error it gave me is - "error Attribute price_history isn't supported in batch formulas"
try:
=BYROW(ARL8:ARL20, LAMBDA(x, CRYPTOFINANCE("kraken:"&x&"/USD", "price_history", "10d"))
update
you can generate a formula with a formula like:
={""; INDEX("=ARRAYFORMULA({SPLIT(""Exchange,Base,Quote,Time,Open,High,Low,Close,Quote Volume,Base Volume"", "","")"&
QUERY(";QUERY(TO_TEXT(CRYPTOFINANCE(""kraken:""&"&C2&
SEQUENCE(C3, 1, C4)&"&""/USD"",""price_history"",""10d"")), ""offset 1"", )",,9^9)&"})")}
demo sheet

Get values from an Array into a variable [Azure Logic App]

I have an array variable "Names" with this values for example ["Unity","Block","PRD","Monit"] and want to get each of them value into a new variable.
The output desired would be something like:
Variable Group = Unity
Variabel Test = Block
(...)
As this is an array i thought a basic Names[0] would give me the first value and so on for 1,2,3,etc, but on a logic app I can't figure out how that works.
Is this possible?
Thanks
You do know select value from an array have to specific the index, just don't know how to use variable expression.
Use variables('variable_name') get the variable value and then add the parameter [index] behind it to select the value you want. Just like the below picture shows.

How to get String with specific index - swift

For example i have String of "version/ofswift/developer". and i want print which starts from back side until the specific index like my specific index will be "/" then the answer should be "developer". What code snippet would do that, and being the most swift-like? I can't find any good practice. I hope you will help me to figure it out. Thank In Advance.
Use String method components(separatedBy:) to produce an array and then get the last element using last
let string = "version/ofswift/developer"
let lastComponent = string.components(separatedBy: "/").last

Retrieving primitive type from Array object in PowerShell

I have a 2-dimensional jagged array at the moment. I have it filled with everything i need. My issue now is that I cannot pull from it. I need to be able to take information from the array and store the values as a primitive type. Instead I keep receiving errors about how it cannot convert a System.Object[] to a System.Int32. I initialized the array as:
$values = New-Object system.Array[][] 1000,1000
Essentially what I need do to is get something by this logic work.
$pageNum = $values[$i][1]
Can someone help me understand how to properly pull just the value of the object so I can cast it to an int? Thanks in advance!
What i ended up finding out is using the .Get(0) worked for me as below.
[int]$pageNum = $values[$i][2].get(0)
This successfully took the value out of the object alone and it did not try and copy the rest of the object over like before

Filter list by custom code in Reporting Services 2005?

Can you do this? The list filter I want to use looks like this:
Expression Operator Value
=Code.GetOccCat(Fields!accountnumber.Value) = =1
No dice. Basically, it acts like that function returns null as far as the filter is concerned, but when I take the filter off and put the exact same function call in a text box within the list, it returns what it's supposed to return. Can you just not do this, or what am I missing?
Edit: here's the function, completely simple:
Public Function GetOccCat(ByVal AccountNum As Integer) As Integer
Return OccCat(AccountNum)
End Function
OccCat is a public array of integers that is filled via an earlier function call. Again, the correct values display if I just put this in a text box, so the array is verified to be filling up correctly.
Edit: the array gets populated by way of a list at the top of the report. The list repeats on accountnumber with no filter. Inside the list is a textbox containing this code:
=Code.SetOccupancy(Fields!accountnumber.Value, First(Fields!new_total_hours.Value)/First(Fields!new_capacity.Value))
And here's that function:
Public Function SetOccupancy(ByVal AccountNum As Integer, ByVal Occ As Double) As String
Occupancy(AccountNum) = Occ
Select Occ
Case Is > .85
OccCat(AccountNum) = 1
Case .7 to .849
OccCat(AccountNum) = 2
Case .4 to .699
OccCat(AccountNum) = 3
Case Is < .4
OccCat(AccountNum) = 4
End Select
Return ""
End Function
FWIW, I've also tried this filter based on the Occupancy array (being > .85 in this case) and gotten the same result.
Could you show your function in your code?
I just checked it, and it certainly works to filter off of custom code. Though I didn't use yours exactly because I don't quite understand what you are trying to filter by.
Which field are you wanting to filter by?
I think you are just putting your code for your expression in the wrong place. Basically, put the field you want to filter by in the expression box that drops down. Then place your =code.getocccat(my value) in the value expression.
Try this and let me know, but it certainly works. I think you have the placement a little off.

Resources