Quantcast
Channel: Mockaroo Community Forum - Latest posts
Viewing all 2648 articles
Browse latest View live

Concatenate string and GUID

$
0
0

assuming you name your fields guid and string then you can concatenate either using a 'Template' field type with template of :
{guid}-{string}
or a 'Formula' field type with formula of:
concat(guid,'-',string)
as in example here: https://www.mockaroo.com/a6f64d60

If you don't want guid and string to appear in your dataset, then rename to __guid and __string (two underscores) and update your formula to refer to the new names.


Generate a JSON value

$
0
0

You need to identify the name elements as being within the array by preceding the field name with the array name and dot(.):

  • name.first_name
  • name.last_name
  • name.full_name

then set full name as a 'Template' field type and create the combined string:
{last_name}, {first_name}
See example: https://www.mockaroo.com/2502ed30

If they must be in the order you have in the question, then you need to first create the first name and last name as hidden fields (precede with two underscores (__):

  • name.__first_name
  • name.__last_name

Then return all three fields as template fields.

How to have timestamp using UTC with each timestamp 3 minutes apart with the latest being the current time?

$
0
0

@mp_np you nailed it!! I should of known to have it within the array. Thanks for taking the time, really appreciate this!

Generate a JSON value

How to have timestamp using UTC with each timestamp 3 minutes apart with the latest being the current time?

Dataset lookup error: undefined method `lists' for nil:NilClass"

$
0
0

Really great support there mockaroo.

How to give each item in custom list it's own value range, with each value incrementing by a specified percentage or number?

$
0
0

I have an array object with a custom list of three objects (fire, water, air), currently it gives me a random 'value' within 23-32, how can each item on the list have its own range? Also how to get each value to increment up or down by specific percentage or number? Here is what I'm working with:
https://mockaroo.com/7c218440

How to give each item in custom list it's own value range, with each value incrementing by a specified percentage or number?

$
0
0

Hi @eddie_nunezt on the first bit of your question, you could use hidden fields under points to generate the ranges for each type then a case formula on value to select the correct one:
case dataType when 'fire' then __firevalue when 'air' then __airvalue when 'water' then __watervalue end
https://mockaroo.com/879eac60
On your second query:
I imagine each of your different ranges may have different rules about incrementing - you have several options, custom list, dataset, or some function based on rownumber of the points array (look at your other query - http://forum.mockaroo.com/t/how-to-have-timestamp-using-utc-with-each-timestamp-3-minutes-apart-with-the-latest-being-the-current-time/2024/10 - for an example of that). You might need to be more specific about how they should increment.


MongoDB Standard UUID

$
0
0

Is there any way to generate a guid for use in mongo imports? It should support the standard UUID format:

Binary('CNWQ/sc5XEKc5xgAAQAAAQ==')

Concatenate string and GUID

Great tool! ... but why no speedup when I paid my $50?

$
0
0

I signed up for a paid plan today and haven't noticed any increase in speed so far :frowning:

Self referential Dataset

$
0
0

Is there a way to upload accurate data to insert and use instead of the random data?
I know, this may sound odd, but it will help me and since Mockaroo is such a great tool I might as well just ask!

How to give each item in custom list it's own value range, with each value incrementing by a specified percentage or number?

$
0
0

@mp_np the first part of this works great in terms of giving each item on list its own number range. For the second part I'm just trying to increase each range by a specific number like a fixed 5 or even within a range of numbers (i.g. 1-5). Perhaps after it reaches the top of the boundary range to then decrease by that same amount?

Curl Download Excel file corrupted

$
0
0

Hello

I'm trying to download a large set of data using curl, but the file is downloaded directly and is corrupted.
Is there a way or command to make it work ?

Thx

curl "https://api.mockaroo.com/api/bb303740?count=15000&key=6f6d2280" > "Baskets.xlsx"

How to give each item in custom list it's own value range, with each value incrementing by a specified percentage or number?

$
0
0

Hi @eddie_nunezt - sounds quite a complicated requirement that would likely need a series of formulas to build it - not something I have time to look at. The easier alternative would be to create datasets that give you the sequence you want and just add the field from the dataset. Do a search on the forum - there's loads with dataset columns, but it really is as simple as just uploading and then pointing a dataset column field to the one you want.


Adding random days between two dates, without time

$
0
0

Oddly enough, I'm having the same issue.

I have a created date set as a SQL Datetime. If a condition is met, status = 'Closed' I want to add a random number of days to determine the closed date. Closed date is also a SQL Datetime. However, for closed date it displays as UTC time. What gives?

Here's my schema: [](https://mockaroo.com/9fe6d580)

Need help with if statement

$
0
0

The below should work:

Paid field (Formula)

random(0, 1)

Thank you field (Formula)

if field("paid") == 0 then 'Thank you' elsif field("paid") == 1 then 'Not Paid' end

Need help with if statement

$
0
0

Hi there.

I'm also having problems with the if statement. I have the following formula in a formula field: if field("dod")>field("date_of_birth") then 'A' else 'B'

And can't help the below error:
Syntax error in formula 'if field("dod")>field("date_of_birth") then 'A' else 'B''

Could you please try to help me? I've tried the following, just o check, but did not work as well:

if 3>1 then 'A' else 'B'

Cheers,
Patricia

Need help with if statement

$
0
0

Hi @patriciainez - try adding end to the end of your statement:

if field("dod") > field("date_of_birth") then 'A' else 'B' end

Add to predefined types car VIN

Viewing all 2648 articles
Browse latest View live