Quantcast
Channel: Mockaroo Community Forum - Latest posts
Browsing all 2665 articles
Browse latest View live

Logic operators -- or

Hello! I need some help. I need to understand how the OR FUNCTION works! I have a foreign key and then I want to relate this foreign key with a letter. basically if ‘thisforeign key’==‘1’ then ‘A’ or...

View Article


Schema question on lat,long coordinates

I don’t think it is possible because you have separated the concatenation value with a comma causing any output for a single value to be quoted if the longitude and latitude were separated to...

View Article


Can we modify the key name in a JSON object?

Bump. Is this possible?

View Article

How Secure is the data stored in Mockaroo?

API calls are secured by your API token. The only way to generate data using your schemas or mock APIs is to provide that token. Other users will not have access to them.

View Article

Can we modify the key name in a JSON object?

No, unfortunately field names are static. I made add this in the future, but I don’t have a timeline for that at the moment.

View Article


Logic operators -- or

Do you mean “if the value is 1 then use A, otherwise use B”? In that case you want: if this_foreign_key == '1' then 'A' else 'B' end

View Article

Schema question on lat,long coordinates

Here’s a working example that I think meets your needs.

View Article

How to concatenate a constant string and a generated number

The trick is to use an inline formula to convert the array of sensors to an object. Here is an example..

View Article


Can we modify the key name in a JSON object?

Actually, there is a way to create the kind of data you’re looking for using a JSON Array with an inline formula. Here is an example.

View Article


It's something wrong with my formula?

I suggest just using a formula for the second number: time_online + random(1, 100) Here’s an example.

View Article

Can mockaroo schemas be seeded so that they generate the same random data...

This isn’t possible at the moment. I’m interested in how you would use this. Can you tell me more about your use case? Maybe it’s something I can add.

View Article

My Country is not listed

I certainly have nothing against India! It turns out the reference data I have for locations just has very little data on India. I’ll look into improving that.

View Article

Conditional regex

I’m trying to generate phone numbers using regex if the id field is mobile the regex changes. I’ve tried using a custom formula, but I get an error message error: Access denied to method gen. my code...

View Article


Image may be NSFW.
Clik here to view.

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

It took me a while to solve this and alvaro is right, but his explanation didn’t help me, but it made sense after I found it. So for the slowpokes like me: In your schema in section ‘Type’ choose...

View Article

Conditional regex

So now I’m trying to treat it as a string and replace the characters: I put this in as regex : /32((1|2|3|4|5|6|7|8|9)1)\d{7}/ and then the following formula if phone_number_id == "mobile" then...

View Article


Conditional regex

I’ve enabled generation using regular expressions in formulas, so the code in your first post should work now.

View Article

Image may be NSFW.
Clik here to view.

Unable to select the field I want to use when using a dataset column type

Hi All, I seem to have a bizzare issue where I cannot select the column I wish to reference from my saved dataset when using the dataset column type. Instead I can select the distribution only,...

View Article


Unable to select the field I want to use when using a dataset column type

What was the format of the file that you uploaded. Perhaps it wasn’t parsed correctly. It needs to be CSV, specifically with comma as the delimiter. Can you show a screenshot of what you see when you...

View Article

How to concatenate a constant string and a generated number

Worked perfectly! Mockaroo has been one of the best tools I have ever purchased to help with my POC work. Thank you!

View Article

How to Import Json Schema to create test data

Hi, I am new to Mockaroo and want to know if one create test data based upon the json schema by importing .json file to Mockaroo.

View Article
Browsing all 2665 articles
Browse latest View live