>>>I have an object that I want to make into a cursor:
>>>
>>>
>>>MyObject.Field01 = Value01
>>>MyObject.Field02 = Value02
>>>MyObject.Field03 = Value03
>>>MyObject.Field04 = Value04
>>>MyObject.Field05 = Value05
>>>
>>>
>>>What is the easiest way to get that into a cursor like this:
>>>
>>>
>>>Field Names:
>>>Field01 Field02 Field03 Field04 Field05
>>>
>>>Row Values:
>>>Value01 Value02 Value03 Value04 Value05
>>>
>>
>>Create the cursor and GATHER NAME from the object would be one way.
>
>I will not always know the number of fields. Some objects will have 1 field, others may have 20 fields.
Using AMEMBERS() you may get all the properties of your object. Then,
1) Do you have predefined type for the fields or you want to get the type from the value?
2) I don't remember if there is a way to search for only user-defined properties in an object using AMEMBERS() function.
But I think you may look into this direction to create the cursor based on the object.
If it's not broken, fix it until it is.
My Blog