if I use Project.Variables.randomFirst(\"randomFirst\") I get \"Danielle\" everytime
Project.Variables.randomFirst(\"randomFirst\", \"\") enters nothing
Project.Variables.randomFirst(\"randomFirst\", 1) enters the 2nd in the array
using * is invalid.
Any ideas? Thanks
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"233","kudosSumWeight":0,"postTime":"2021-07-19T01:25:19.677-07:00","lastPublishTime":"2021-07-19T01:25:19.677-07:00","metrics":{"__typename":"MessageMetrics","views":1673},"visibilityScope":"PUBLIC","placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"MessageEdge","cursor":"MjUuNHwyLjF8b3wxfDE0OjAsMzk6MXwx","node":{"__ref":"AcceptedSolutionMessage:message:220123"}}]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"ModerationData:moderation_data:220123":{"__typename":"ModerationData","id":"moderation_data:220123","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"AcceptedSolutionMessage:message:220123":{"__typename":"AcceptedSolutionMessage","author":{"__ref":"User:user:82740"},"id":"message:220123","entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:220019/message:220123","revisionNum":1,"uid":220123,"depth":5,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:testcomplete-questions"},"parent":{"__ref":"ForumReplyMessage:message:220122"},"conversation":{"__ref":"Conversation:conversation:220019"},"subject":"Re: Data generator question","moderationData":{"__ref":"ModerationData:moderation_data:220123"},"body":"Figured it out:
use
Project.Variables.randomFirst(\"randomFirst\", Math.floor(Math.random() * 1154))
","body@stripHtml({\"removeProcessingText\":true,\"removeSpoilerMarkup\":true,\"removeTocMarkup\":true,\"truncateLength\":200})@stringLength":"102","postTime":"2021-07-19T01:46:43.551-07:00","lastPublishTime":"2021-07-19T01:46:43.551-07:00","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"attachments":{"__typename":"AttachmentConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"solution":true,"metrics":{"__typename":"MessageMetrics","views":1719},"placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"videos":{"__typename":"VideoConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"isEscalated":null,"readOnly":false,"customFields":[],"body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"102","kudosSumWeight":1,"repliesCount":2,"visibilityScope":"PUBLIC"},"User:user:21756":{"__typename":"User","id":"user:21756","uid":21756,"login":"AlexKaras","biography":null,"registrationData":{"__typename":"RegistrationData","status":null,"registrationTime":"2013-07-19T01:15:21.000-07:00"},"deleted":false,"email":"","avatar":{"__typename":"UserAvatar","url":"https://community.smartbear.com/t5/s/nwkab66374/images/dS0yMTc1Ni00aTg4NzJBNDUwNjM4MzlDQkE"},"entityType":"USER","eventPath":"community:nwkab66374/user:21756"},"ModerationData:moderation_data:220135":{"__typename":"ModerationData","id":"moderation_data:220135","status":"APPROVED","rejectReason":null},"AcceptedSolutionMessage:message:220135":{"__typename":"AcceptedSolutionMessage","author":{"__ref":"User:user:21756"},"id":"message:220135","entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:220019/message:220135","revisionNum":1,"uid":220135,"depth":6,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:testcomplete-questions"},"parent":{"__ref":"AcceptedSolutionMessage:message:220123"},"conversation":{"__ref":"Conversation:conversation:220019"},"subject":"Re: Data generator question","moderationData":{"__ref":"ModerationData:moderation_data:220135"},"body":"Hi,
\n\n
Excuse me for the late reply...
\nYou have got correct solution.
\n'Random' mode in the Data Generator just means that data will be generated in a random unordered sequence. But the resulting data table is accessed sequentially unless explicitly specified like in your code.
\n\n
Minor improvement if you don't mind: in order to get rid of hardcoded 1154 value you may use the code like this -
\nKeywordTests.CreateContactVerifyAndLogout.Variables.ListNames(\"FirstName\",
Math.floor(Math.random() * KeywordTests.CreateContactVerifyAndLogout.Variables.ListNames.RowCount));
","body@stripHtml({\"removeProcessingText\":true,\"removeSpoilerMarkup\":true,\"removeTocMarkup\":true,\"truncateLength\":200})@stringLength":"208","postTime":"2021-07-19T04:50:34.702-07:00","lastPublishTime":"2021-07-19T04:50:34.702-07:00","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"attachments":{"__typename":"AttachmentConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"solution":true,"metrics":{"__typename":"MessageMetrics","views":1685},"placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"videos":{"__typename":"VideoConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"isEscalated":null,"customFields":[]},"ModerationData:moderation_data:220042":{"__typename":"ModerationData","id":"moderation_data:220042","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ModerationData:moderation_data:220026":{"__typename":"ModerationData","id":"moderation_data:220026","status":"APPROVED","rejectReason":null},"ForumReplyMessage:message:220026":{"__typename":"ForumReplyMessage","id":"message:220026","entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:220019/message:220026","revisionNum":1,"uid":220026,"depth":1,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:testcomplete-questions"},"conversation":{"__ref":"Conversation:conversation:220019"},"subject":"Re: Data generator question","readOnly":false,"editFrozen":false,"showMoveIndicator":false,"moderationData":{"__ref":"ModerationData:moderation_data:220026"},"body":"
What we are not doing here is data driven loops inside a single keyword test.
Simply, a new first name and surname will be provided per keyword test so they are differentiated when they are in our backend.
Hope that makes sense.
","body@stringLength":"247","rawBody":"What we are not doing here is data driven loops inside a single keyword test.
Simply, a new first name and surname will be provided per keyword test so they are differentiated when they are in our backend.
Hope that makes sense.
","author":{"__ref":"User:user:82740"},"isEscalated":null,"postTime":"2021-07-15T11:07:57.451-07:00","solution":false,"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"repliesCount":6},"Revision:revision:220042_1":{"__typename":"Revision","id":"revision:220042_1","lastEditTime":"2021-07-16T02:32:15.071-07:00"},"QueryVariables:ReplyList:message:220042:1":{"__typename":"QueryVariables","id":"ReplyList:message:220042:1","value":{"id":"message:220042","first":10,"sorts":{"kudosSumWeight":{"direction":"DESC","order":0},"postTime":{"direction":"ASC","order":1}},"repliesFirst":3,"repliesFirstDepthThree":1,"repliesSorts":{"kudosSumWeight":{"direction":"DESC","order":0},"postTime":{"direction":"ASC","order":1}},"useAvatar":true,"useAuthorLogin":true,"useAuthorRank":true,"useBody":true,"useKudosCount":true,"useTimeToRead":false,"useMedia":false,"useReadOnlyIcon":false,"useRepliesCount":true,"useSearchSnippet":false,"useAcceptedSolutionButton":true,"useSolvedBadge":false,"useAttachments":false,"attachmentsFirst":5,"useTags":false,"useNodeAncestors":false,"useUserHoverCard":false,"useNodeHoverCard":false,"useModerationStatus":true,"usePreviewSubjectModal":false,"useMessageStatus":true}},"CachedAsset:text:en_US-shared/client/components/users/UserAvatar-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/users/UserAvatar-1749759144459","value":{"altText":"{login}'s avatar","altTextGeneric":"User's avatar"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/ranks/UserRankLabel-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/ranks/UserRankLabel-1749759144459","value":{"altTitle":"Icon for {rankName} rank"},"localOverride":false},"CachedAsset:text:en_US-components/common/ExternalLinkWarningModal-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/common/ExternalLinkWarningModal-1749759144459","value":{"title":"Leaving the Community","description":"You're about to leave this site and navigate to an external domain. Are you sure you want to continue?","action.submit":"Continue","action.cancel":"Go Back"},"localOverride":false},"CachedAsset:text:en_US-components/messages/AcceptedSolutionButton-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/messages/AcceptedSolutionButton-1749759144459","value":{"accept":"Mark as Solution","accepted":"Marked as Solution","errorHeader":"Error!","errorAdd":"There was an error marking as solution.","errorRemove":"There was an error unmarking as solution.","solved":"Solved","topicAlreadySolvedErrorTitle":"Solution Already Exists","topicAlreadySolvedErrorDesc":"Refresh the browser to view the existing solution"},"localOverride":false},"CachedAsset:text:en_US-components/messages/ThreadedReplyList-1749759144459":{"__typename":"CachedAsset","id":"text:en_US-components/messages/ThreadedReplyList-1749759144459","value":{"title":"{count, plural, one{# Reply} other{# Replies}}","title@board:BLOG":"{count, plural, one{# Comment} other{# Comments}}","title@board:TKB":"{count, plural, one{# Comment} other{# Comments}}","title@board:IDEA":"{count, plural, one{# Comment} other{# Comments}}","title@board:OCCASION":"{count, plural, one{# Comment} other{# Comments}}","noRepliesTitle":"No Replies","noRepliesTitle@board:BLOG":"No Comments","noRepliesTitle@board:TKB":"No Comments","noRepliesTitle@board:IDEA":"No Comments","noRepliesTitle@board:OCCASION":"No Comments","noRepliesDescription":"Be the first to reply","noRepliesDescription@board:BLOG":"Be the first to comment","noRepliesDescription@board:TKB":"Be the first to comment","noRepliesDescription@board:IDEA":"Be the first to comment","noRepliesDescription@board:OCCASION":"Be the first to comment","messageReadOnlyAlert:BLOG":"Comments have been turned off for this post","messageReadOnlyAlert:TKB":"Comments have been turned off for this article","messageReadOnlyAlert:IDEA":"Comments have been turned off for this idea","messageReadOnlyAlert:FORUM":"Replies have been turned off for this discussion","messageReadOnlyAlert:OCCASION":"Comments have been turned off for this event"},"localOverride":false},"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMjktSG1CVVBR\"}":{"__typename":"AssociatedImage","url":"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMjktSG1CVVBR","height":64,"width":64,"mimeType":"image/png"},"Rank:rank:29":{"__typename":"Rank","id":"rank:29","position":1,"name":"Alumni","color":"949494","icon":{"__ref":"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMjktSG1CVVBR\"}"},"rankStyle":"OUTLINE"},"User:user:76348":{"__typename":"User","id":"user:76348","uid":76348,"login":"brumazz","biography":null,"registrationData":{"__typename":"RegistrationData","status":null,"registrationTime":"2017-09-29T07:16:54.872-07:00"},"deleted":false,"email":"","avatar":{"__typename":"UserAvatar","url":"https://community.smartbear.com/t5/s/nwkab66374/images/dS03NjM0OC0xMDY4NWlBQjIwQUYxOEZERjgxM0RE"},"rank":{"__ref":"Rank:rank:29"},"entityType":"USER","eventPath":"community:nwkab66374/user:76348"},"ModerationData:moderation_data:220076":{"__typename":"ModerationData","id":"moderation_data:220076","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:220076":{"__typename":"ForumReplyMessage","uid":220076,"id":"message:220076","entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:220019/message:220076","revisionNum":1,"author":{"__ref":"User:user:76348"},"readOnly":false,"repliesCount":4,"depth":3,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:testcomplete-questions"},"parent":{"__ref":"ForumReplyMessage:message:220042"},"conversation":{"__ref":"Conversation:conversation:220019"},"subject":"Re: Data generator question","moderationData":{"__ref":"ModerationData:moderation_data:220076"},"body":"How are you changing the input of the field you are trying to data drive?
\n\n
Could you provide a screenshot?
\n