Questions tagged [array]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
1k views

Array or List of Big Objects as parameter for AuraEnabled controller

Does Salesforce support passing an array or list of big objects as a parameter for an AuraEnabled controller method? In other words can I pass from a lightning component javascript controller an array ...
ploc's user avatar
  • 315
1 vote
2 answers
9k views

How To Split String by space and store each character or substring in array

How To Split String by space and store each character or substring in array I have: String - '(1 OR 2) AND 3' I need in this way: String [] filterLogicSplittedbySpace=new String[]{'(', '1', 'OR', ...
Radhe Shyam's user avatar
13 votes
3 answers
17k views

Apex Array Slice

Sometimes I like to use a Queueable to perform work on a list of Ids or sObjects over the heaver Batchable Interface. However, to do this, we need a very solid implementation of an Array slice ...
Caspar Harmer's user avatar
7 votes
1 answer
4k views

Pre-defined Length List of Lists

Per the docs on Lists, I can use array notation to create a list of pre-allocated length: List<String> colors = new String[1]; However, replacing the primitive String type with a list doesn't ...
Jason Clark's user avatar
  • 11.9k
4 votes
2 answers
595 views

Cast arrays in Apex

Its been a long time since I casted an array and cant remember if it can be done the way Im hoping. I have an array of type Row (Row[] rows) that is returned from a method. The method I need to pass ...
discodowney's user avatar
0 votes
1 answer
2k views

Issue passing values to a list - Lightning component

I have been developing a lightning component to add products and can't seem to get my ids pushing to my productsList. My current revelant code is as follows: CMP <aura:component controller="...
Nebbyyy's user avatar
  • 838
3 votes
2 answers
280 views

Alternative for many if/then AMPscript statements?

I'm guessing there is a more efficient way for me to handle the following scenario and am looking for some advice. Say I have 20 different Cities, abbreviated in my database by 3 letters. LOS, for ...
Peachy's user avatar
  • 323
0 votes
1 answer
127 views

Not able to display Multiple string in visualforce page from controller

I have a Multiple Product and each has it's own UnitPrice i am just passing it to String variable and store it inside the for loop but not sure How to display each of them in visualforce page here ...
WantToBeACoder's user avatar
1 vote
1 answer
7k views

Convert String array to Set of string in apex class

Can someone please help me to convert String array values to Set of string? I have below code where it says Set is not getting populated from string array. Criteria=[SELECT Franchise__c FROM ...
Testing_SFDC's user avatar
  • 2,940
0 votes
1 answer
983 views

Display list in triggered send email based on supplied data

I have only recently started using the salesforce marketing cloud (exact target) to send out emails, so if there's something conceptually wrong with my question, forgive me :). So let's say I have ...
Adam Vigh's user avatar
  • 159
1 vote
3 answers
676 views

Random Access to Array

Is the array-object in Salesforce really an array, or is it a list "disguised" as an array? Specifically: Is the access of myArray[3] really random (="quick") or does the runtime need to iterate over ...
Stefan Woehrer's user avatar
1 vote
1 answer
282 views

My custom object holding a list of another custom object

Maybe I am not understanding how salesforce works but I am trying to link up my custom object named "Program" to hold an array (or list) of another custom object I have called "Student". The structure ...
Baby Coder's user avatar
2 votes
1 answer
209 views

Logic for a parsed JSON list?

Is it possible to have logic on a parsed JSON list? I have my entire list saved into a variable 'info' and and want to look at the parsed information and write a conditional for it. My end goal is to ...
Olivia's user avatar
  • 3,461
1 vote
1 answer
3k views

Convert String to array

I have a string ex.(a,b,c) which is inputted in a textarea(long). how can I convert it into array in apex trigger? Thanks in advance.
sfdclearner's user avatar
4 votes
0 answers
3k views

How do I access an array index referenced by attribute?

I am totally new to Lightning, and I come from a JavaScript background. This is what I have so far. <aura:attribute name="Packages" type="Map" default="{p1: {name: 'Package 1', price: '2500 $'}, ...
Praveen Kumar Purushothaman's user avatar
1 vote
2 answers
780 views

Rendering Array of Custom Objects in Component

I have a custom visualforce component with a controller, it takes an attribute of an Id of a related record, and in the controller I query for the set of objects I want to display. When I attempt to ...
jordan.baucke's user avatar
6 votes
1 answer
2k views

How does Guide Template Language parse a straight JSON array?

I'm learning Guide, and I've been able to parse an array of objects... AmpScript: set @json = '[{"voucher":"123456789"}, {"voucher":"234567890"}]' Guide: {{.dataobject JsonVar type=variable ...
Ron Coffman's user avatar
3 votes
2 answers
2k views

How to pass an array of a class from a helper to an apex controller

I have created a class with several fields like this: public class Tier{ @AuraEnabled public String Name {get; set;} @AuraEnabled public integer Min {get; set;} ...
Henk3000's user avatar
  • 522
0 votes
2 answers
796 views

FullCalendar - List has different values when in Javascript to Visualforce

I'm implementing FullCalendar into a visualforce page where the user can then apply filters to the list of events, the system searches and then it is represented on a table and on the calendar. I have ...
hunty's user avatar
  • 47
1 vote
1 answer
759 views

How do I process an HTML array with AMPscript during POST and save each value?

How can I use an HTML array with AMPscript and save each array item in it's own data extension field? For example, when using a group of checkboxes. The following snippet is slightly dumbed down—but ...
James's user avatar
  • 111
1 vote
2 answers
1k views

Get all automations that exist using SOAP using C#

Goal: I'm attempting to get every automation in the system available to me under my account using the SOAP API in C#. It's also part of this guy's question. I know this has been asked but this is ...
Dave's user avatar
  • 56
3 votes
2 answers
885 views

Remote Objects: Insert an array of objects

Is it possible to insert an array of objects using Remote Object Model? Here's my code: <apex:remoteObjects jsNamespace="romodel"> <apex:remoteObjectModel name="Stock__c" jsShorthand="...
Arthlete's user avatar
  • 4,907
0 votes
1 answer
333 views

Multiple blob creation for creating multiple PDFs

I have below piece of code to generate a PDF file. I have a requirement to create multiple blobs for multiple PDFs. I am trying to do so but not working as expected. Apex code PageReference pageRef =...
Testing_SFDC's user avatar
  • 2,940
2 votes
1 answer
6k views

apex string split

Unable to split string by multiple characters. String myString = 'abc$$$xyz'; string[] myArray = myString.Split('$$$'); System.Debug(myArray.Size()); I get result for myArray.Size = 1 and when ...
user569925's user avatar
  • 1,179
0 votes
1 answer
1k views

Process two dimensional list (string)?

i have a two dimensional array/list populated but need help on how to iterate thru it: List< List<string>> Wdays = new List< list<string>>(); List< String> Mnth = new ...
Prabhu Sethupathy's user avatar
2 votes
1 answer
703 views

How to pass an array into an Apex Controller

How to pass the array value from the form to an apex controller?.. Meaning this form gonna display 2 or more times depend on the product quantity.. But the problem is that I need to pass the values to ...
Lennon Leopoldo's user avatar
0 votes
2 answers
352 views

How to insert a data from the same inputfields into a custom object

I,m trying to save data into a custom object from a repeated form in visualforce page. This is the visualforce code. Can I do do this using array? or list? or map?.. any idea?.. <apex:form> <...
Lennon Leopoldo's user avatar
0 votes
0 answers
665 views

Removing a duplicate element from a JSON Array

I'm trying to figure out a way to dedupe JSON arrays based on the _prop.Invoice_Number__c value returned by a Remote Object retrieve. Please see attached screenshot of the JSON as viewed through a ...
vshake's user avatar
  • 99
0 votes
1 answer
2k views

Get image attachments with apex

I would like to display the the first image attachment for a record in my visualforce page. The visualforce page uses a standard controller to get the record data and I've built an extension to ...
Deployment Failure's user avatar
1 vote
2 answers
109 views

Showing totals in custom page using SOQL

I have a custom object which requires booleon values which are attached to contacts like the following: Contact Option1 Option2 Option3 ============================================ Bob ...
Deployment Failure's user avatar
0 votes
0 answers
135 views

Displaying key/pair data

I have four objects which allow me to record events, rsvp contacts attending the event and store any additional details for each given event. My schema is as follows: Contact (Id, Name) <-- ...
Deployment Failure's user avatar
1 vote
1 answer
105 views

what is the proper syntax for getting an element out of a jquery array? [closed]

I am new to javascript/jquery. I am having a lot of trouble understanding how to write the proper syntax for this. I would appreciate any help. in apex you would do this : Public list<project__C&...
user7167's user avatar
4 votes
2 answers
27k views

Apex: Get value from first element of Map

I am receiving the following JSON for a web service: { "count" : 1, "posts" : { "1234567" : { "id" : "1234567", "private" : false, "message" : "New post on Monday Jan 5th", ...
Adam's user avatar
  • 187
3 votes
1 answer
4k views

Parse dynamic JSON with Apex

I am receiving the following JSON as a result of a web callout: { "count" : 1, "posts" : { "1234567" : { "id" : "1234567", "private" : false, "message" : "...
Adam's user avatar
  • 187
0 votes
2 answers
496 views

join three objects on remote action

In regards to reports the regular ones are not working for what we are trying to achieve we have 5 objects that are related in someway or another but not specifically one to another, having an ...
Tlacaelel Ramon Luis's user avatar
5 votes
1 answer
1k views

User input to an array in Visualforce

I have a Visualforce page that collects user input for 125 integer variables that are then used by the controller to create records. I'd rather use an array instead of defining all those variables, ...
snugsfbay's user avatar
  • 956

1 2
3