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,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:220019/message:220122","replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"MessageEdge","cursor":"MjUuMnwyLjF8b3wxfDE0OjAsMzk6MXwx","node":{"__ref":"AcceptedSolutionMessage:message:220123"}}]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"editFrozen":false,"body@stringLength":"4336","rawBody":"Hi, thanks for looking.
I think my issue might be how I am setting this. I can't find the correct syntax to use in the settext input.
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
","images":{"__typename":"AssociatedImageConnection","edges":[{"__typename":"AssociatedImageEdge","cursor":"MjUuMnwyLjF8b3wyNXxfTlZffDE","node":{"__ref":"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/bS0yMjAxMjItMTE0MTRpQUJCNzIxNzFDMjI1RDFDRg?revision=1\"}"}},{"__typename":"AssociatedImageEdge","cursor":"MjUuMnwyLjF8b3wyNXxfTlZffDI","node":{"__ref":"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/bS0yMjAxMjItMTE0MTVpOEI3REZBNzA1RjkyNzA4MA?revision=1\"}"}},{"__typename":"AssociatedImageEdge","cursor":"MjUuMnwyLjF8b3wyNXxfTlZffDM","node":{"__ref":"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/bS0yMjAxMjItMTE0MTZpQjQ5MENENjU0QzExRjNEQw?revision=1\"}"}},{"__typename":"AssociatedImageEdge","cursor":"MjUuMnwyLjF8b3wyNXxfTlZffDQ","node":{"__ref":"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/bS0yMjAxMjItMTE0MTdpN0I3OTA5MDVDQzdFQUNEMA?revision=1\"}"}},{"__typename":"AssociatedImageEdge","cursor":"MjUuMnwyLjF8b3wyNXxfTlZffDU","node":{"__ref":"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/bS0yMjAxMjItMTE0MThpOUQ3NTJFRDUwQTk0MkUxQQ?revision=1\"}"}},{"__typename":"AssociatedImageEdge","cursor":"MjUuMnwyLjF8b3wyNXxfTlZffDY","node":{"__ref":"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/bS0yMjAxMjItMTE0MTlpMjBDQzA1OERCOTNDRkUzRg?revision=1\"}"}},{"__typename":"AssociatedImageEdge","cursor":"MjUuMnwyLjF8b3wyNXxfTlZffDc","node":{"__ref":"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/bS0yMjAxMjItMTE0MjBpM0MxQUY5MERCNEY1RDQwOQ?revision=1\"}"}},{"__typename":"AssociatedImageEdge","cursor":"MjUuMnwyLjF8b3wyNXxfTlZffDg","node":{"__ref":"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/bS0yMjAxMjItMTE0MjFpOTUzM0YxNzkzQkVDQ0JDRg?revision=1\"}"}}],"totalCount":8,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"timeToRead":1,"currentRevision":{"__ref":"Revision:revision:220122_1"},"latestVersion":null,"messagePolicies":{"__typename":"MessagePolicies","canModerateSpamMessage":{"__typename":"PolicyResult","failureReason":{"__typename":"FailureReason","message":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","key":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","args":[]}}}},"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","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":1714},"placeholder":false,"originalMessageForPlaceholder":null,"videos":{"__typename":"VideoConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"isEscalated":null,"entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:220019/message:220123","readOnly":false,"customFields":[],"editFrozen":false,"body@stringLength":"117","rawBody":"Figured it out:
use
Project.Variables.randomFirst(\"randomFirst\", Math.floor(Math.random() * 1154))
","kudosSumWeight":1,"repliesCount":2,"timeToRead":1,"currentRevision":{"__ref":"Revision:revision:220123_1"},"latestVersion":null,"visibilityScope":"PUBLIC","messagePolicies":{"__typename":"MessagePolicies","canModerateSpamMessage":{"__typename":"PolicyResult","failureReason":{"__typename":"FailureReason","message":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","key":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","args":[]}}},"body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"102"},"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","rank":{"__ref":"Rank:rank:33"}},"ModerationData:moderation_data:220135":{"__typename":"ModerationData","id":"moderation_data:220135","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"AcceptedSolutionMessage:message:220135":{"__typename":"AcceptedSolutionMessage","author":{"__ref":"User:user:21756"},"id":"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":1682},"placeholder":false,"originalMessageForPlaceholder":null,"videos":{"__typename":"VideoConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"isEscalated":null,"entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:220019/message:220135","customFields":[],"readOnly":false,"editFrozen":false,"body@stringLength":"659","rawBody":"
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));
","kudosSumWeight":0,"repliesCount":1,"timeToRead":1,"currentRevision":{"__ref":"Revision:revision:220135_1"},"latestVersion":null,"visibilityScope":"PUBLIC","messagePolicies":{"__typename":"MessagePolicies","canModerateSpamMessage":{"__typename":"PolicyResult","failureReason":{"__typename":"FailureReason","message":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","key":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","args":[]}}}},"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-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/users/UserAvatar-1741125846000","value":{"altText":"{login}'s avatar","altTextGeneric":"User's avatar"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/ranks/UserRankLabel-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/ranks/UserRankLabel-1741125846000","value":{"altTitle":"Icon for {rankName} rank"},"localOverride":false},"CachedAsset:text:en_US-components/messages/AcceptedSolutionButton-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/AcceptedSolutionButton-1741125846000","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-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/ThreadedReplyList-1741125846000","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},"Revision:revision:220026_1":{"__typename":"Revision","id":"revision:220026_1","lastEditTime":"2021-07-15T11:07:57.451-07:00"},"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMzMtV3lDSm9v\"}":{"__typename":"AssociatedImage","url":"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMzMtV3lDSm9v","height":20,"width":20,"mimeType":"image/png"},"Rank:rank:33":{"__typename":"Rank","id":"rank:33","position":4,"name":"Champion Level 3","color":"FF730B","icon":{"__ref":"AssociatedImage:{\"url\":\"https://community.smartbear.com/t5/s/nwkab66374/images/cmstMzMtV3lDSm9v\"}"},"rankStyle":"OUTLINE"},"Revision:revision:220135_1":{"__typename":"Revision","id":"revision:220135_1","lastEditTime":"2021-07-19T04:50:34.702-07:00"},"Revision:revision:220123_1":{"__typename":"Revision","id":"revision:220123_1","lastEditTime":"2021-07-19T01:46:43.551-07:00"},"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","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?
\nHow are you changing the input of the field you are trying to data drive?
\n\n
Could you provide a screenshot?
\n